mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Merge pull request #1473 from woocommerce/PCP-1816-incompatibility-with-woo-commerce-one-page-checkout-or-similar-use-cases-in-version-2-1-0
Incompatibility with WooCommerce One Page Checkout (or similar use cases) in Version 2.1.0 (1816)
This commit is contained in:
commit
1fd0899149
1 changed files with 7 additions and 0 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue