__( 'Invalid security token.', 'charitable' ) ) ); } // Get current mode. $test_mode = charitable_get_option( 'test_mode' ); $mode = $test_mode ? 'test' : 'live'; // Get Square gateway instance. $gateway = Charitable_Gateway_Square::get_instance(); // Get initialization data. $data = array( 'location' => $gateway->get_square_location_id( $mode ), 'enable_google_pay' => false, 'enable_apple_pay' => false, 'wallet_not_supported' => __( 'Recurring payments can\'t be processed using Google Pay or Apple Pay. Please enter your card details.', 'charitable' ), ); // Log initialization attempt. if ( charitable_is_debug( 'square' ) ) { // phpcs:disable error_log( sprintf( '[Charitable Square] Initializing Square in %s mode', $mode ) ); // phpcs:enable } wp_send_json_success( $data ); } } endif;