Fix is_checkout usage

This commit is contained in:
Alex P 2023-10-17 09:59:12 +03:00
parent 9abaebf7db
commit e4ec8f8630
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -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.
*/