mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Merge pull request #1786 from woocommerce/PCP-2139-release-2-4-0-rc-1-place-order-button-remains-could-not-retrieve-order
release 2.4.0_rc1 Place order button remains - Could not retrieve order (2139)
This commit is contained in:
commit
9d43e736c5
7 changed files with 63 additions and 19 deletions
|
@ -129,10 +129,18 @@ class ApplepayModule implements ModuleInterface {
|
|||
function () use ( $c, $button ) {
|
||||
$smart_button = $c->get( 'button.smart-button' );
|
||||
assert( $smart_button instanceof SmartButtonInterface );
|
||||
$page_has_block = has_block( 'woocommerce/checkout' ) || has_block( 'woocommerce/cart' );
|
||||
if ( $smart_button->should_load_ppcp_script() || $page_has_block ) {
|
||||
if ( $smart_button->should_load_ppcp_script() ) {
|
||||
$button->enqueue();
|
||||
}
|
||||
|
||||
if ( has_block( 'woocommerce/checkout' ) || has_block( 'woocommerce/cart' ) ) {
|
||||
/**
|
||||
* Should add this to the ButtonInterface.
|
||||
*
|
||||
* @psalm-suppress UndefinedInterfaceMethod
|
||||
*/
|
||||
$button->enqueue_styles();
|
||||
}
|
||||
}
|
||||
);
|
||||
add_action(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue