From 5a5933ce91bceede6798e6792da2125fe320d87d Mon Sep 17 00:00:00 2001 From: Danae Millan Date: Thu, 20 Oct 2022 14:20:11 -0300 Subject: [PATCH] Fix button positioning for products with one page checkout enabled --- modules/ppcp-button/src/Assets/SmartButton.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 89c15b90b..44f37ebfe 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -370,6 +370,7 @@ class SmartButton implements SmartButtonInterface { if ( ( is_product() || wc_post_content_has_shortcode( 'product_page' ) ) && ! $not_enabled_on_product_page + && ! is_checkout() ) { add_action( $this->single_product_renderer_hook(), @@ -420,6 +421,7 @@ class SmartButton implements SmartButtonInterface { // TODO: it seems like there is no easy way to properly handle vaulted PayPal free trial, // so disable the buttons for now everywhere except checkout for free trial. && ! $this->is_free_trial_product() + && ! is_checkout() ) { add_action( $this->single_product_renderer_hook(),