diff --git a/modules/ppcp-button/src/Helper/ContextTrait.php b/modules/ppcp-button/src/Helper/ContextTrait.php index daddbb0a9..e1af3e3c0 100644 --- a/modules/ppcp-button/src/Helper/ContextTrait.php +++ b/modules/ppcp-button/src/Helper/ContextTrait.php @@ -18,6 +18,13 @@ trait ContextTrait { */ protected function context(): string { if ( is_product() || wc_post_content_has_shortcode( 'product_page' ) ) { + + // Do this check here instead of reordering outside conditions. + // In order to have more control over the context. + if ( ( is_checkout() ) && ! $this->is_paypal_continuation() ) { + return 'checkout'; + } + return 'product'; }