• Resolved Pocket Flan

    (@pocket-flan)


    It’s really unbelievable the amount of Woocommerce updates that keep breaking stuff or show new warnings, themes break, codes break here and there, plugins break… it never ends. These guys must be so desperate, it’s really embarrassing.

    The following code used to work fine:

    add_action('init', 'PF_renameCategoryTags');
    
    function PF_renameCategoryTags() {
        global $wp_taxonomies;
    
        $cat = $wp_taxonomies['product_cat'];
        $cat->label = 'My Categories'; // breaks in WC 2.1.10
        $cat->labels->singular_name = 'My Category'; // breaks in WC 2.1.10
        $cat->labels->name = $cat->label;
        $cat->labels->menu_name = $cat->label;
    
    }

    After updating Woocommerce to 2.1.10 I received the following warning pointing to the above code:

    Warning: Creating default object from empty value in /home/…/functions.php on line x, y, z

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WARNING: Creating default object from empty value… Thanks Woothemes, again!’ is closed to new replies.