From 78d98be098f1273bcc08e1b5f8486c2a99bddf9e Mon Sep 17 00:00:00 2001 From: dinamiko Date: Mon, 28 Mar 2022 16:33:45 +0200 Subject: [PATCH] Move up pay order render button before checking empty cart --- modules/ppcp-button/src/Assets/SmartButton.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 853c14dc5..2420b9277 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -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; }