mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Revert "Change the product_preview
to woocommerceBlock
"
This reverts commit 55b2e6d8d4
.
This commit is contained in:
parent
55b2e6d8d4
commit
f38ab36da8
3 changed files with 8 additions and 11 deletions
|
@ -40,7 +40,7 @@ class PayLaterBlockModule implements ModuleInterface {
|
||||||
* @return bool true if the block is enabled, otherwise false.
|
* @return bool true if the block is enabled, otherwise false.
|
||||||
*/
|
*/
|
||||||
public static function is_block_enabled( SettingsStatus $settings_status ): bool {
|
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( 'product_preview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,10 +30,7 @@ document.addEventListener( 'DOMContentLoaded', () => {
|
||||||
partnerClientId: PcpPayLaterConfigurator.partnerClientId,
|
partnerClientId: PcpPayLaterConfigurator.partnerClientId,
|
||||||
partnerName: 'WooCommerce',
|
partnerName: 'WooCommerce',
|
||||||
bnCode: 'Woo_PPCP',
|
bnCode: 'Woo_PPCP',
|
||||||
placements: ['cart', 'checkout', 'product', 'shop', 'home'],
|
placements: ['cart', 'checkout', 'product', 'shop', 'home', 'product_preview'],
|
||||||
custom_placement:[{
|
|
||||||
message_reference: 'woocommerceBlock',
|
|
||||||
}],
|
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
button: publishButtonClassName,
|
button: publishButtonClassName,
|
||||||
header: PcpPayLaterConfigurator.headerClassName,
|
header: PcpPayLaterConfigurator.headerClassName,
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ConfigFactory {
|
||||||
'product' => $this->for_location( $settings, 'product' ),
|
'product' => $this->for_location( $settings, 'product' ),
|
||||||
'shop' => $this->for_location( $settings, 'shop' ),
|
'shop' => $this->for_location( $settings, 'shop' ),
|
||||||
'home' => $this->for_location( $settings, 'home' ),
|
'home' => $this->for_location( $settings, 'home' ),
|
||||||
'woocommerceBlock' => $this->for_location( $settings, 'woocommerceBlock' ),
|
'product_preview' => $this->for_location( $settings, 'product_preview' ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue