mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Move up pay order render button before checking empty cart
This commit is contained in:
parent
9f1231412b
commit
78d98be098
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue