🐛 Hide disabled APM buttons in Standard Payments

This commit is contained in:
Philipp Stracker 2024-06-12 15:45:54 +02:00
parent 874ebbc7a0
commit f3f6765ac3
No known key found for this signature in database
3 changed files with 10 additions and 0 deletions

View file

@ -418,9 +418,12 @@ class Button implements ButtonInterface {
$shipping['countries'] = array_keys( $this->wc_countries()->get_shipping_countries() );
}
$is_enabled = $this->settings->has( 'googlepay_button_enabled' ) && $this->settings->get( 'googlepay_button_enabled' );
return array(
'environment' => $this->environment->current_environment_is( Environment::SANDBOX ) ? 'TEST' : 'PRODUCTION',
'is_debug' => defined( 'WP_DEBUG' ) && WP_DEBUG ? true : false,
'is_enabled' => $is_enabled,
'sdk_url' => $this->sdk_url,
'button' => array(
'wrapper' => '#ppc-button-googlepay-container',