mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Fix is_checkout usage
This commit is contained in:
parent
9abaebf7db
commit
e4ec8f8630
1 changed files with 3 additions and 1 deletions
|
@ -684,8 +684,10 @@ class SmartButton implements SmartButtonInterface {
|
|||
|
||||
$product = wc_get_product();
|
||||
|
||||
$location = $this->location();
|
||||
|
||||
if (
|
||||
! is_checkout() && is_a( $product, WC_Product::class )
|
||||
$location === 'product' && is_a( $product, WC_Product::class )
|
||||
/**
|
||||
* The filter returning true if PayPal buttons can be rendered, or false otherwise.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue