Sync with trunk

This commit is contained in:
Daniel Dudzic 2024-04-10 11:28:51 +02:00
commit 7af2162f1c
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
28 changed files with 359 additions and 109 deletions

View file

@ -199,19 +199,18 @@ export default function Edit({ attributes, clientId, setAttributes }) {
/>
)}
<SelectControl
label={__('Placement page', 'woocommerce-paypal-payments')}
help={__('Used for the analytics dashboard in the merchant account.', 'woocommerce-paypal-payments')}
options={[
{ label: __('Detect automatically', 'woocommerce-paypal-payments'), value: 'auto' },
{ label: __('Cart', 'woocommerce-paypal-payments'), value: 'cart' },
{ label: __('Payment', 'woocommerce-paypal-payments'), value: 'payment' },
{ label: __('Product', 'woocommerce-paypal-payments'), value: 'product' },
{ label: __('Product list', 'woocommerce-paypal-payments'), value: 'product-list' },
{ label: __('Home', 'woocommerce-paypal-payments'), value: 'home' },
{ label: __('Category', 'woocommerce-paypal-payments'), value: 'category' },
]}
value={placement}
onChange={(value) => setAttributes({ placement: value })}
label={ __( 'Placement page', 'woocommerce-paypal-payments' ) }
help={ __( 'Used for the analytics dashboard in the merchant account.', 'woocommerce-paypal-payments' ) }
options={ [
{ label: __( 'Detect automatically', 'woocommerce-paypal-payments' ), value: 'auto' },
{ label: __( 'Product Page', 'woocommerce-paypal-payments' ), value: 'product' },
{ label: __( 'Cart', 'woocommerce-paypal-payments' ), value: 'cart' },
{ label: __( 'Checkout', 'woocommerce-paypal-payments' ), value: 'checkout' },
{ label: __( 'Home', 'woocommerce-paypal-payments' ), value: 'home' },
{ label: __( 'Shop', 'woocommerce-paypal-payments' ), value: 'shop' },
] }
value={ placement }
onChange={ ( value ) => setAttributes( { placement: value } ) }
/>
</PanelBody>
</InspectorControls>

View file

@ -40,7 +40,7 @@ class PayLaterBlockModule implements ModuleInterface {
* @return bool true if the block is enabled, otherwise false.
*/
public static function is_block_enabled( SettingsStatus $settings_status ): bool {
return self::is_module_loading_required() && $settings_status->is_pay_later_messaging_enabled_for_location( 'woocommerceBlock' );
return self::is_module_loading_required() && $settings_status->is_pay_later_messaging_enabled_for_location( 'custom_placement' );
}
/**