Small fix for woocommerce compatibility
-
Hi,
There is one small fix needed to be able to show Woocommerce product screen options:
Instead of:
var content = jQuery(this).children('.column-categories').html(); content = content.replace('>'+category+'<', '><b>' + categoryWithHtml + '</b><'); jQuery(this).children('.column-categories').html(content);
Replace by:
var content = jQuery(this).children('.column-categories').html(); if ( content) { content = content.replace('>'+category+'<', '><b>' + categoryWithHtml + '</b><'); jQuery(this).children('.column-categories').html(content); }
The problem is in woocommerce, in Products screen there is no .column-categories, and then jquery breaks with content.replace. So it′s needed check if content exists.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Small fix for woocommerce compatibility’ is closed to new replies.