Is there a way to skip an isset() check in an if clause? [duplicate]

Considering the following code:

if (isset($array['key']) && $array['key'] == 'some value') {
    // do something...
} else {
    // do something else...
}

Is there a way I can simplify the code so that I don’t have to check with isset every time I want to use an array value in an if clause? Something like $array['key'] ?= 'some value'

how to input a png watermark image on a pdf file then download it….in PHP

I’m using PHP can someone help me, the flow was the user need to choose a file first then after choosing the file the program need to add a PNG watermark signature then after that the user can print or download the file…someone tells me that I need to convert the pdf file to PNG file after converting it, it will insert a PNG signature file then convert it back to pdf…im newbie when it comes to programming thanks…

try to put a php variable to echo parent index number [closed]

echo "<li class='row'> 
  
 <div class='prtbrrr'>

  $meta[dual_pic1c]  ////printing  static  data working inside loop
   <br/>
  $meta[dual_pic1c]  ///// here i want the number should be dynamic I use .$i but not working
 

 
 </div>
   
 </li> ";

echo “

$meta[dual_pic1c] ////printing static data working inside loop

$meta[dual_pic1c] ///// here i want the number should be dynamic I use .$i but not working

“; here

PHP 7.1.33 in MAMP Pro doesn’t go above 30 seconds in max_execution_time setting

I’m working in a Cake PHP 2 application, I’m running some big queries that require PHP’s max_execution_time setting to be higher than 30 seconds. I’ve dumped phpinfo() on the page and can see that it’s being pulled through, and if I change it from 40 to something like 5, it does exit after 5 seconds.

But anything above 30 seconds and it just exits at 30. What am I missing?

I’ve tried editing every PHP conf file offered by MAMP pro and still no luck.
enter image description here
enter image description here

WordPress plugin onclick function not working

Im currently creating my own plugin to window.print a post on my WordPress website.
But it seems that i cannot acces the function thru the onclick. If i put the window.print in the button itself it works, but that is not how it has to work for me.

 
// Only do this when a single post is displayed
if ( is_single() ) { 
 
// Message you want to display after the post

$content .= '<button type="Submit" value="Print_PDF" onclick="GetPDF()"> Print PDF </button>';
 
} 
// Return the content
return $content; 
    
    
}```

But whenever i click the button i get an error that says that it does not acces this function:

```  function GetPDF() {
window.print();
}```

It is in the same file.

PHP: array chunk where each chunk is not more than a fixed memory size

I have an array

$profileIds = [1, 2, 3, 4, 5, 6, 7, .............., 8000];

I want to get the minimum number of array chunks like [1,2,3], [4,5,6,7,8], [9, 10, 11, 12] where each chunk size is not more than fixed memory size i.e. 200KB. Thanks in advance.

I am getting the size of the array in bytes by doing:

$bytes = mb_strlen(serialize($array), '8bit');

Printing only the first level attributes in the hierarchy of a variable in PHP

I want to print entities in PHP for debug purposes with print_r() or var_dump(). The entities are loaded via doctrine/symfony from the database and some of them have a lot of
attributes attached. Example:

file
- id
- name
- extension
- fileGroups
- ...

fileGroups is a list of objects of another entity:

fileGroup
- id
- name
- client
- ...

Client is a another entity … and so forth.

Now when I execute print_r($file), I would like to have only the first list of attributes printed and not the ones below in the hierarchy (because that causes a lazy loading and a memory error in many cases and I’m not interested in that data in the first place).

Is there a possibility to tell PHP to only print certain attribute hierarchies (like only first hierarchy or first and second)?
Or is there a way to tell doctrine to not load attributes (maybe with a parameter), if they are printed via PHP?

wc_print_notice clear previous notices or reload chechout page in one time

I‘v wordpress woocommerce store in the checkout page i’m using wc_print_notice to display notice basde on city field i’v two notices to display the first notice is “We will deliver your order soon” the second notice “Sorry can’t deliver to your city”
if ( is_admin() ) return $available_gateways;

// HERE define the allowed cities to delevery 
$cities = array( 'jazan' ); // just one city other city can't reach  to it yet

// Testing output (display a notice)
if ( in_array( WC()->customer->get_shipping_city(), $cities ) { 
   wc_print_notice( sprintf( 'We will deliver your order soon','succuss' );
    return $available_gateways; // enabled payment method
}
 else
    {        wc_print_notice( sprintf( 'Sorry can't deliver to your city') , 'error' );
     // disale payment method 
}

the code work finely but if the customer select our city he see 1st notice if he select after that other city he see 2nd message And so on
i want to display one notice only not previously notics i want code to clear previous notices or relode page

enter image description here

The second issue is – How to disable place to odrer button rather than disable avilable payment gateway as shown in code

thanks to help.

why am i get this error when i call php API?

i am working on flutter app with php
i made the api with php
and the database still local and i request from mobile to api via IPv4 Address
and evry thing was good
but today i try to request to get data from database by api i have this error

E/flutter (12737): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: 
Connection failed
E/flutter (12737): #0      IOClient.send
package:http/src/io_client.dart:88
E/flutter (12737): <asynchronous suspension>
E/flutter (12737): #1      BaseClient._sendUnstreamed
package:http/src/base_client.dart:93
E/fluter (12737): <asynchronous suspension>
E/flutter (12737): #2      _withClient
package:http/http.dart:164

Php program should suspend execution till jsonobj received

I have a php program which processes and displays data based on a json object received from a website xxx. The xxx website posts the data as a json object. Since php cannot open a browser window (all on server) I need to execute the php code in a browser on my client. However, I am unable to make the php program wait till the json object is posted by the xxx website web hook. Since the php code processes jsondata received from the website xxx and displays an html page of these results, I get an error as soon as I open the php code in a browser
I have tried opening browser window through javascript within the php code but does not work

Rows not found, Codeiginiter Show Index

I’m new with Codeigniter. I got error on my code using Codeigniter. My index doesn’t show the row of my datatable, even my datatable had data in it. Anyone can find my error or typo text on my code? Please help me :(.
btw I have 2 controllers.

Here’s my first controller (modules->api->controller->Tower.php)

defined('BASEPATH') OR exit('No direct script access allowed');

require_once APPPATH . '/core/MY_Auth.php';
require 'vendor/autoload.php';
use PhpOfficePhpSpreadsheetSpreadsheet;
use PhpOfficePhpSpreadsheetWriterXlsx;

class Tower extends MY_Auth
{
    protected $ruleMsg;
    function __construct()
    {
        parent::__construct();
        $this->load->model('Model_tower');
        $this->load->library('Pagingmeta');
        $this->load->library('Validate');
        $this->ruleMsg = '%s must be filled';
    }

    public function index_get($id = '') {
        if (!empty($id)) {
            return $this->get_detail($id);
        }
        $keyword = $this->get('search', true);
        $except = $this->get('excepth', true);
        $type = $this->get('type', true)??'list';
        $page = $this->get('page', true)??1;
        $limit = $this->get('limit', true)??10;
        $data = $this->Model_tower->get_list($keyword, $this->role, $this->regional, $page, $limit);
        $this->response([
            'message'       => 'Get tower success',
            'data'          => $data['data'],
            'meta'          => $this->pagingmeta->get_meta($data['total'], $limit, $page)
        ], REST_Controller::HTTP_OK);
    }

    private function get_detail($id) {
        $data = $this->Model_tower->get_detail($id);
        if (empty($data)) {
            return $this->response([
                'message' => 'Data not found'
            ], REST_Controller::HTTP_BAD_REQUEST);
        }

        if ($this->regional != $data->regional && $this->role != 'ADMN' && $id != $this->userId) {
            return $this->response([
                'message' => "You didn't have right to access this data"
            ], REST_Controller::HTTP_BAD_REQUEST);
        }

       if ($this->role == 'ADMN') {
            $data->is_editable = true;  
        }

        return $this->response([
            'message'       => 'Get tower success',
            'data'          => $data
        ], REST_Controller::HTTP_OK);
    }

    public function tower_post() {
        $this->validate_role();
        $rules = $this->rules_post($this->post(null, true));
        $params = $this->validate->validation($this->post(null, true), $rules);
        if (!$params['status']) {
            $this->response([
                'message' => $params['errors'][0]
            ], REST_Controller::HTTP_BAD_REQUEST);
        }
        
        $params = $params['data'];
        if ($this->Model_tower->validate_site_id($params['site_id'])) {
            $this->response([
                'message' => 'Site ID already exist'
            ], REST_Controller::HTTP_BAD_REQUEST);
        }
        $id = $this->Model_tower->tower_action($params, $this->userId);
        $this->response([
            'message'       => 'Create tower success',
            'data'          => $id
        ], REST_Controller::HTTP_CREATED);
    }

    public function tower_put($id = '') {
        $this->validate_role();
        $rules = $this->rules_post($this->put(null, true));
        $params = $this->validate->validation($this->put(null, true), $rules);
        if (!$params['status']) {
            $this->response([
                'message' => $params['errors'][0]
            ], REST_Controller::HTTP_BAD_REQUEST);
        }

        $params = $params['data'];
        if ($this->Model_tower->validate_site_id($params['site_id'], $id)) {
            $this->response([
                'message' => 'Site ID already exist'
            ], REST_Controller::HTTP_BAD_REQUEST);
        }
        $this->Model_tower->tower_action($params, $this->userId, $id);
        $this->response([
            'message'       => 'Update tower success',
            'data'          => $id
        ], REST_Controller::HTTP_OK);
    }

    public function upload_post() {
        $this->validate_role();
        $this->load->library('Uuid');
        $spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load($_FILES['data']['tmp_name']);
 
        $sheet = $spreadsheet->getActiveSheet();
        
        // Store data from the activeSheet to the varibale in the form of Array
        $data = array_values($sheet->toArray(null,true,true,true));
        
        $oldData = $this->Model_tower->get_all_data();
        $oldData = array_column($oldData, 'site_id');
        $insertData = [];
        $now = date('Y-m-d H:i:s');
        foreach($data as $index => $d) {
            if ($index == 0) {
                continue;
            }
            $code = $this->uuid->generate();
            $type = '';
            $regional = '';

            $inputedType = $d['D'];
            if ($inputedType == 'MTEL') {
                $type = 'mtel';   
            } else {
                $type = 'reseller';
            }

            $inputedRegional = $d['G'];
            if ($inputedRegional == 'Jawa Timur') {
                $regional = 'JATIM';   
            } else if ($inputedRegional == 'Jawa Tengah') {
                $regional = 'JATENG';   
            } else {
                $regional = 'BALNUS';
            }

            if (empty($d['A']) || empty($d['B']) || in_array($d['A'], $oldData)) {
                break;
            }

            $insertData[] = [
                'site_id'           => $d['A'],
                'project_id'        => $d['B'],
                'site_name'         => $d['C'],
                'type'              => $type,
                'company'           => $d['E'],
                'address'           => $d['F'],
                'regional_code'     => $regional,
                'active_status'     => 1,
                'created_at'        => $now,
                'updated_at'        => $now,
                'code'              => $code,
                'created_by'        => $this->userId,
                'updated_by'        => $this->userId

            ];
        }

        if (!empty($insertData)) {
            $this->Model_tower->insert_batch($insertData);
        }

        $this->response([
            'message'       => 'Bulk insert success',
        ], REST_Controller::HTTP_CREATED);
        
    }

    private function validate_role() {
        if ($this->role != 'ADMN') {
            return $this->response([
                'message' => "You didn't have right to access this action"
            ], REST_Controller::HTTP_BAD_REQUEST);
        }
    }

    private function rules_post() {
        return  [
            [
                'field' => 'site_id',
                'label' => 'Site id',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'project_id',
                'label' => 'Project id',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'name',
                'label' => 'Name',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'type',
                'label' => 'Type',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'regional',
                'label' => 'Regional',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'address',
                'label' => 'Address',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'company',
                'label' => 'Company',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
            [
                'field' => 'status',
                'label' => 'Status',
                'rules' => 'required',
                'errors' => ['required' => $this->ruleMsg]
            ],
        ];
    }

} 

and this is my second Controller (Controllers->Tower.php)

defined('BASEPATH') OR exit('No direct script access allowed');

require_once APPPATH . '/core/MY_Cont.php';

class Tower extends MY_Cont
{
    public function __construct()
    {
        parent::__construct();
    }

    public function index() {
        $opts   = array(
            'content_only'      => false,
            'parent_menu'       => 'tower',
            'child_menu'        => 'List Tower',
            'nav_target'        => 'tower_list',
        );
        
        $this->view('tower/index', $opts);
    }

    public function detail($code = null) {
        if (empty($code)) {
            $this->render_invalid();
        }

        $fetch_detail   = $this->get_data_tower($code);
        
        if ($fetch_detail['code'] !== 200) {
            $this->render_invalid();
        }
        
        $opts           = array(
            'content_only'      => false,
            'parent_menu'       => 'tower',
            'child_menu'        => 'Tower Detail',
            'tower'             => $fetch_detail['response']->data,
            'nav_target'        => 'tower_list',
        );
        
        $this->view('tower/detail', $opts);
    }

    public function new() {
        $regional       = $this->get_regional();

        $opts           = array(
            'content_only'      => false,
            'parent_menu'       => 'tower',
            'child_menu'        => 'Add New Tower',
            'list_region'       => $regional['response']->data,
            'nav_target'        => 'tower_new',
        );
        
        $this->view('tower/new', $opts);
    }

    public function bulk() {
        $opts   = array(
            'content_only'      => false,
            'parent_menu'       => 'tower',
            'child_menu'        => 'Upload Tower',
            'nav_target'        => 'tower_bulk',
        );
        
        $this->view('tower/bulk', $opts);
    }

    public function edit($code = null) {
        if (empty($code)) {
            $this->render_invalid();
        }

        $fetch_detail   = $this->get_data_tower($code);
        
        if ($fetch_detail['code'] !== 200) {
            $this->render_invalid();
        }

        $regional       = $this->get_regional();

        $opts           = array(
            'content_only'      => false,
            'parent_menu'       => 'tower',
            'child_menu'        => 'Edit Tower Detail',
            'tower'             => $fetch_detail['response']->data,
            'list_region'       => $regional['response']->data,
            'nav_target'        => 'tower_list',
        );
        
        $this->view('tower/edit', $opts);
    }

    private function render_invalid() {
        header('HTTP/1.0 404');
        $opts   = array(
            'content_only'      => true,
            'cfg_mainclass'     => 'fullpage',
            'private_routing'   => false,
        );

        $this->view('layouts/404', $opts);
        exit();
    }

    private function get_data_tower($id = '') {
        if (empty($id)) {
            $curl       = curl_init(base_url() . 'api/tower');
        } else {
            $curl       = curl_init(base_url() . 'api/tower/' . $id);
        }

        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array(
            'Authorization: ' . $this->session->userdata('usertoken'),
        ));

        $result     = json_decode(curl_exec($curl));
        $httpcode   = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        curl_close($curl);

        return array(
            'code'      => $httpcode,
            'response'  => $result,
        );
    }

    private function get_regional() {
        $curl       = curl_init(base_url() . 'api/master/regional');

        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array(
            'Authorization: ' . $this->session->userdata('usertoken'),
        ));

        $result     = json_decode(curl_exec($curl));
        $httpcode   = curl_getinfo($curl, CURLINFO_HTTP_CODE);
        curl_close($curl);

        $response   = array(
            'code'      => $httpcode,
            'response'  => $result,
        );
        
        return $response;
    }
}

and this is my index.php

    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="mainpanel">
                    <div class="mainpanel-header">
                        <div class="row align-items-end">
                            <div class="col-9">
                                <h3>List Tower</h3>
                                <h5>Click on tower to view detail</h5>
                            </div>
                            <div class="col text-right">
                                <a href="{{ base_url }}tower/new" class="panel-cta">
                                    Add new tower
                                </a>
                            </div>
                        </div>
                    </div>
                    <form method="post" action="" id="form-filter-data" autocomplete="off">
                        <div class="digi-tablefilter">
                            <div class="filter-inputholder">
                                <label>Search</label>
                                <input type="text" name="search" placeholder="Search keyword" id="filter-search" />
                            </div>
                            <div class="filter-inputholder">
                                <input type="submit" value="Apply filter" />
                            </div>
                        </div>
                    </form>
                    <span class="table-information" id="t-info"></span>
                    <div class="digi-tableholder">
                        <table>
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Project ID</th>
                                    <th>Site ID</th>
                                    <th>Regional</th>
                                    <th>Company</th>
                                </tr>
                            </thead>
                            <tbody id="tower-table-value"></tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div id="test-pag"></div>
            </div>
        </div>
    </div>
</section>
<script>
     $(document).ready(function() {
        const payload = {
            page: 1,
            limit: 10,
            search: '',
        }

        fetchListData(payload);
    });


    function fetchListData(payload) {
        var apiURL = "{{ api_server ~ 'tower' }}";
        var userToken = getUserToken();

        $.ajax({
            url: apiURL,
            type: "GET",
            data: payload,
            headers: {
                Authorization: userToken,
            },
            success: function(response) {
                const { data, message, meta } = response;
                buildDataTable(data, meta);
            },
            error: function(response) {
                const { responseJSON } = response;
                addNotification({
                    type: 'error',
                    title: 'Fetching data tower gagal',
                    message: responseJSON.message,
                });
                return;
            }
        });
    }

    function buildDataTable(data, metadata) {
        const target = document.getElementById("tower-table-value");
        const txtResult = document.getElementById("t-info");
        $("#tower-table-value").empty();
        target.innerHTML = "";
        txtResult.innerHTML = "";

        if (data.length == 0) {
            buildEmptyRows();
            return;
        }


        $.each(data, function(idx, item) {
            const { id, name, project_id, site_id, regional, company } = item;

            const tr = document.createElement('tr');

            const nameHolder = document.createElement('td');
            const projectHolder = document.createElement('td');
            const siteHolder = document.createElement('td');
            const regionalHolder = document.createElement('td');
            const companyHolder = document.createElement('td');


            nameHolder.innerHTML = name;
            projectHolder.innerHTML = project_id;
            siteHolder.innerHTML = site_id;
            regionalHolder.innerHTML = regional;
            companyHolder.innerHTML = company;


            tr.appendChild(nameHolder);
            tr.appendChild(projectHolder);
            tr.appendChild(siteHolder);
            tr.appendChild(regionalHolder);
            tr.appendChild(companyHolder);

            tr.onclick = function(e) {
                window.location.href = `{{ base_url }}tower/detail/${item.id}`;
            }

            target.appendChild(tr);
        });

        var $resultText = `Showing result with keyword <strong>${$("#filter-search").val() == '' ? '-' : $("#filter-search").val()}</strong> ${metadata.total} row(s) found.`;
        txtResult.innerHTML = $resultText;

        if (metadata.last_page > 1) {
            buildPagination(metadata);
        } else {
            hideLoader();
        }
    }

    function buildEmptyRows() {
        const target = document.getElementById("tower-table-value");
        const txtResult = document.getElementById("t-info");


        var $resultText = `Showing result with keyword <strong>${$("#filter-search").val() == '' ? '-' : $("#filter-search").val()}</strong> • 0 row(s) found.`;
        txtResult.innerHTML = $resultText;

        const tr = document.createElement('tr');
        const td = document.createElement('td');
        td.colspan = 5;
        td.innerHTML = 'No Rows Found.';

        tr.appendChild(td);
        target.appendChild(tr);
        
        hideLoader();
    }   

    function buildPagination(metadata) {
        const { from, to, last_page, current_page, per_page, total } = metadata;
        $("#test-pag").pagination({
            items: total,
            itemsOnPage: per_page,
            currentPage: current_page,
            onPageClick: function(pageNumber, event) {
                event.preventDefault();
                const payload = {
                    page: pageNumber,
                    limit: per_page,
                    search: '',
                }

                fetchListData(payload);
            }
        });
    }

    $("#form-filter-data").submit(function(e) {
        e.preventDefault();
        const $payload = {
            page: 1,
            limit: 10,
            search: $("#filter-search").val()
        }

        fetchListData($payload);
    })
</script>

I’ll very thankful if u can solve my problem 😀

how can i store below data in database?

i have below data need to store in table so how can i ?

how can i store below data in database?

    - Type : POST
    - Example body / schema:

    {



        "customer": {
            "name": "Grug",
            "email": "[email protected]"
        },

        "plan": {
            "name": "Pro",
            "price": "999",
            "validity": "365"
        }







    }
  








   how can i store below data in database?

have below data need to store in table so how can i ?

Moodle having trouble with updating

I am running a moodle server and wanted to upgrade it to 3.11.8+, which resulted in the following installation errors:

View here

I already removed any external Plugins form the installation, so I guess the error is with either my database or moodle code directory. Not sure tho, since I am kind of new to the moodle administrating scene.

Any help is appreciated.
Thanks in advance.

Grouping some array into one , but keep the different data

Sorry if this questions looks a basic one, but just this got me overnight

How to transform this :

[
    [
        'id' => 2,
        'role_id' => 2,
        'name' => 'PABLO',
        'sections' => 'FINANCE',
        'department' => 'FATP',
     ],
    [
       'id' => 2,
       'role_id' => 2,
       'name' => 'PABLO',
       'sections' => 'ACCOUNTING',
       'department' => 'FATP',
    ]
]

to This :

[
    [
        'id' => 2,
        'role_id' => 2,
        'name' => 'PABLO',
        'sections' => ['FINANCE','ACCOUNTING']
        'department' => 'FATP',
    ],
]

dequeue parent style in child theme does not work (‘vc_after_init’ / ‘vc_before_init’ hook)

I am starting to doubt my sanity. I read ALL the StackOverflow posts about wp_dequeue_style, but none of the answer were solving my problem. This is my situation:

I have a parent theme and a child theme. The parent theme adds this to the DOM:

<link property="stylesheet" rel='stylesheet' 
      id='vc_google_fonts_playfair_displayregularitalic700700italic900900italic-css'
      href='//fonts.googleapis.com/css?family=Playfair+Display%3Aregular%2Citalic%2C700%2C700italic%2C900%2C900italic&#038;ver=5.9.4'
      type='text/css' media='all' />

So the handle is: 'vc_google_fonts_playfair_displayregularitalic700700italic900900italic'.

In the PARENT theme, it is enqueued like this in cms_cta.php:

wp_enqueue_style( 
    'vc_google_fonts_' . vc_build_safe_css_class( $text_font_data['values']['font_family'] ), 
    '//fonts.googleapis.com/css?family=' . $text_font_data['values']['font_family'] . $subsets
);

This action is added in the parent theme`s functions.php here:

function kl_vc_elements(){
    require_once( get_template_directory() . '/inc/elements/cta/cms_cta.php' );
}
add_action('vc_before_init', 'kl_vc_elements');

In my CHILD theme’s functions.php, I dequeue like this:

function remove_google_fonts()
{
    wp_dequeue_style( 'vc_google_fonts_playfair_displayregularitalic700700italic900900italic' );
    wp_deregister_style( 'vc_google_fonts_playfair_displayregularitalic700700italic900900italic' );
}
$prio = 10000;
add_action('vc_after_init', 'remove_google_fonts', $prio );
add_action('vc_before_init', 'remove_google_fonts', $prio );
add_action('wp_enqueue_scripts', 'remove_google_fonts', $prio );
  • I added other hooks, too, just to rule them out.
  • I tried other priority values, such as 1 and PHP_INT_MAX.
  • I checked, that the enqueued style is not a dependency of another wp_enqueue_style.
  • I checked if it is added via another hook.
  • I removed the wp_enqueue_style code to make sure cms_cta.php is really the script that adds the font style (removing the code removes the font).
  • I checked if it is registered anywhere in the parent theme, but there is only wp_enqueue_style('vc_googe_fonts_***'), no wp_register_script('vc_googe_fonts_***').
  • I checked if remove_google_fonts() is called (with a good old die;).

Whatever I tried, I can’t get the damned style removed.

Does anybody have an idea, what I oversaw? I’ve spent a whole day debugging but I am out of ideas.

PS: Modifying the parent theme code is not an option!