Modify variation description
-
Hi there,
I developed a simple filter to hook up one element in the variations array but doesn’t seem to work, is returning me the following error: ‘PHP fatal error Call to a member function get_description() on array.’
The snippet is the following:
function change_variation_descriptions( $variation ) { global $variation; $variation['variation_description'] = wc_format_content( htmlspecialchars_decode($variation->get_description()) ); return $variation; } add_filter( 'woocommerce_available_variation', 'change_variation_descriptions');
Could you please help me?
Thanks,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Modify variation description’ is closed to new replies.