Merge pull request #556 from woocommerce/PCP-604-paypal-button-missing-on-pay-for

Move up pay order render button before checking empty cart
This commit is contained in:
Emili Castells 2022-03-28 17:20:49 +02:00 committed by GitHub
commit d6286ec6e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -352,6 +352,8 @@ class SmartButton implements SmartButtonInterface {
);
}
add_action( $this->pay_order_renderer_hook(), array( $this, 'button_renderer' ), 10 );
if ( $this->is_cart_price_total_zero() ) {
return false;
}
@ -390,7 +392,6 @@ class SmartButton implements SmartButtonInterface {
}
add_action( $this->checkout_button_renderer_hook(), array( $this, 'button_renderer' ), 10 );
add_action( $this->pay_order_renderer_hook(), array( $this, 'button_renderer' ), 10 );
return true;
}