wp_mail vs mail functions and header arrays

Both the mail() function in PHP and wp_mail() in WordPress do support passing an array or string of headers, but the difference is: With mail(), the array keys are the header names and its values are the respective header values, e.g. array( ‘Content-type’ => ‘text/html; charset=utf-8’ ). wp_mail() on the other hand, expects that the … Read more

Warning: Attempt to read property “term_id” on int – Woocommerce

You can I think you should use get_terms_args filter instead of get_terms and just add exclude arg, so now get_terms() function won’t retrieve those cats and you’ll get right count. Here’s code example: add_filter( ‘get_terms_args’, ‘mamaduka_edit_get_terms_args’, 10, 2 ); /** * Exclude product categories from Woocommerce * */ function mamaduka_edit_get_terms_args( $args, $taxonomies ) { //print_r($taxonomies); … Read more