mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Do not display googlepay button inside smart buttons in classic checkout if goolepay button is enabled
This commit is contained in:
parent
f8ed3328a8
commit
473b286de0
1 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,7 @@ use Exception;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use WC_Countries;
|
use WC_Countries;
|
||||||
use WooCommerce\PayPalCommerce\Button\Assets\ButtonInterface;
|
use WooCommerce\PayPalCommerce\Button\Assets\ButtonInterface;
|
||||||
|
use WooCommerce\PayPalCommerce\Button\Helper\ContextTrait;
|
||||||
use WooCommerce\PayPalCommerce\Googlepay\Endpoint\UpdatePaymentDataEndpoint;
|
use WooCommerce\PayPalCommerce\Googlepay\Endpoint\UpdatePaymentDataEndpoint;
|
||||||
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
use WooCommerce\PayPalCommerce\Onboarding\Environment;
|
||||||
use WooCommerce\PayPalCommerce\Session\SessionHandler;
|
use WooCommerce\PayPalCommerce\Session\SessionHandler;
|
||||||
|
@ -25,6 +26,8 @@ use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
|
||||||
*/
|
*/
|
||||||
class Button implements ButtonInterface {
|
class Button implements ButtonInterface {
|
||||||
|
|
||||||
|
use ContextTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL to the module.
|
* The URL to the module.
|
||||||
*
|
*
|
||||||
|
@ -235,7 +238,7 @@ class Button implements ButtonInterface {
|
||||||
|
|
||||||
$button_enabled_product = $this->settings_status->is_smart_button_enabled_for_location( 'product' );
|
$button_enabled_product = $this->settings_status->is_smart_button_enabled_for_location( 'product' );
|
||||||
$button_enabled_cart = $this->settings_status->is_smart_button_enabled_for_location( 'cart' );
|
$button_enabled_cart = $this->settings_status->is_smart_button_enabled_for_location( 'cart' );
|
||||||
$button_enabled_checkout = true;
|
$button_enabled_checkout = ! ( $this->context() === 'checkout' && $this->settings->has( 'googlepay_button_enabled' ) && $this->settings->get( 'googlepay_button_enabled' ) );
|
||||||
$button_enabled_payorder = true;
|
$button_enabled_payorder = true;
|
||||||
$button_enabled_minicart = $this->settings_status->is_smart_button_enabled_for_location( 'mini-cart' );
|
$button_enabled_minicart = $this->settings_status->is_smart_button_enabled_for_location( 'mini-cart' );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue