Skip to content

Commit

Permalink
Merge branch 'develop' into feat/google-play-test-mode-live-account-c…
Browse files Browse the repository at this point in the history
…ompatibility-notice
  • Loading branch information
frosso authored Feb 27, 2025
2 parents ae90d7a + 2f84fc8 commit 816bbff
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-pmme-on-cart-block
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Init PMME container in cart block so that it can be dynamically rendered once the requirements are met.
4 changes: 4 additions & 0 deletions changelog/fix-wc9.7-ece-script-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

fix: GooglePay/ApplePay script dependencies with WooCommerce 9.7
24 changes: 4 additions & 20 deletions client/cart/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,10 @@
* Internal dependencies
*/
import { renderBNPLCartMessaging } from './product-details';
import { getUPEConfig } from 'wcpay/utils/checkout';

const { registerPlugin } = window.wp.plugins;

const paymentMethods = getUPEConfig( 'paymentMethodsConfig' ) || {};

const BNPL_PAYMENT_METHODS = {
AFFIRM: 'affirm',
AFTERPAY: 'afterpay_clearpay',
KLARNA: 'klarna',
};

const bnplPaymentMethods = Object.values( BNPL_PAYMENT_METHODS ).filter(
( method ) => method in paymentMethods
);

if ( bnplPaymentMethods.length ) {
// Register BNPL site messaging on the cart block.
registerPlugin( 'bnpl-site-messaging', {
render: renderBNPLCartMessaging,
scope: 'woocommerce-checkout',
} );
}
registerPlugin( 'bnpl-site-messaging', {
render: renderBNPLCartMessaging,
scope: 'woocommerce-checkout',
} );
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public function scripts() {
}

wp_localize_script( 'WCPAY_EXPRESS_CHECKOUT_ECE', 'wcpayExpressCheckoutParams', $express_checkout_params );
wp_localize_script( 'WCPAY_BLOCKS_CHECKOUT', 'wcpayExpressCheckoutParams', $express_checkout_params );

wp_set_script_translations( 'WCPAY_EXPRESS_CHECKOUT_ECE', 'woocommerce-payments' );

Expand Down

0 comments on commit 816bbff

Please sign in to comment.