Move up pay order render button before checking empty cart

This commit is contained in:
dinamiko 2022-03-28 16:33:45 +02:00
parent 9f1231412b
commit 78d98be098

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;
}