Affirm Banner | Q2 2024

added by Latoya

Product Icon

Square

Accepting payments is easy with Square. Clear rates, fast deposits (1-2 business days). Sell online and in person, and sync all payments, items and inventory.

Apple Pay Button domain registration script never fires

Inside woocommerce-square/includes/Gateway/Digital_Wallet.php the ‘apple_pay_domain_registration’ callback that is supposed to happen after init never gets fired.

/**
* Setup the Digital Wallet class
*
* @since 2.3
*/
public function __construct( $gateway ) {
$this->gateway = $gateway;

if ( ‘yes’ === $gateway->get_option( ‘enabled’, ‘no’ ) && $this->is_digital_wallet_enabled() ) {
add_action( ‘wp’, array( $this, ‘init’ ) );
add_action( ‘admin_notices’, array( $this, ‘admin_notices’ ) );
}

if ( is_admin() && ( $gateway->get_plugin()->is_gateway_settings() || $gateway->get_plugin()->is_plugin_settings() ) ) {
add_action( ‘init’, array( $this, ‘apple_pay_domain_registration’ ) ); // <– NEVER FIRES
}

If you change the hook to be 'admin_notices' it works just fine…

Author

Petar Cvitanusic

Current Status

Open

Last updated: April 5, 2023

0 comments

Log in to comment on this feature request.