mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Fix minor attribute naming conflict
This commit is contained in:
parent
2317c90db4
commit
f82074a56e
5 changed files with 6 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
|||
"example": {},
|
||||
"parent": [ "woocommerce/cart-totals-block" ],
|
||||
"attributes": {
|
||||
"id": {
|
||||
"blockId": {
|
||||
"type": "string",
|
||||
"default": "woocommerce-paypal-payments/cart-paylater-messages"
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"example": {},
|
||||
"parent": [ "woocommerce/checkout-totals-block" ],
|
||||
"attributes": {
|
||||
"id": {
|
||||
"blockId": {
|
||||
"type": "string",
|
||||
"default": "woocommerce-paypal-payments/checkout-paylater-messages"
|
||||
},
|
||||
|
|
|
@ -177,7 +177,7 @@ class PayLaterWCBlocksModule implements ModuleInterface {
|
|||
array(
|
||||
'render_callback' => function ( array $attributes ) use ( $c ) {
|
||||
return PayLaterWCBlocksUtils::render_paylater_block(
|
||||
$attributes['id'] ?? 'woocommerce-paypal-payments/cart-paylater-messages',
|
||||
$attributes['blockId'] ?? 'woocommerce-paypal-payments/cart-paylater-messages',
|
||||
$attributes['ppcpId'] ?? 'ppcp-cart-paylater-messages',
|
||||
'cart',
|
||||
$c
|
||||
|
@ -198,7 +198,7 @@ class PayLaterWCBlocksModule implements ModuleInterface {
|
|||
array(
|
||||
'render_callback' => function ( array $attributes ) use ( $c ) {
|
||||
return PayLaterWCBlocksUtils::render_paylater_block(
|
||||
$attributes['id'] ?? 'woocommerce-paypal-payments/checkout-paylater-messages',
|
||||
$attributes['blockId'] ?? 'woocommerce-paypal-payments/checkout-paylater-messages',
|
||||
$attributes['ppcpId'] ?? 'ppcp-checkout-paylater-messages',
|
||||
'checkout',
|
||||
$c
|
||||
|
|
|
@ -26,7 +26,7 @@ class PayLaterWCBlocksRenderer {
|
|||
*/
|
||||
public function render( array $attributes, string $location, ContainerInterface $c ) {
|
||||
if ( PayLaterWCBlocksModule::is_placement_enabled( $c->get( 'wcgateway.settings.status' ), $location ) ) {
|
||||
return '<div id="' . esc_attr( $attributes['ppcpId'] ?? '' ) . '" data-block-name="' . esc_attr( $attributes['id'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
return '<div id="' . esc_attr( $attributes['ppcpId'] ?? '' ) . '" data-block-name="' . esc_attr( $attributes['blockId'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class PayLaterWCBlocksUtils {
|
|||
echo $renderer->render(
|
||||
array(
|
||||
// phpcs:ignore
|
||||
'id' => $block_id,
|
||||
'blockId' => $block_id,
|
||||
// phpcs:ignore
|
||||
'ppcpId' => $ppcp_id,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue