• Resolved peppertherapper

    (@peppertherapper)


    Hello,
    since the latest update my solution for displaying shortcodes in the options descriptions by putting

    add_filter(‘ppom_option_label’, ‘do_shortcode’);

    in my functions.php does not work any more. I used it to display a very small audio player in the radio button option.

    Can you provide a fix for this or send me a link to the last version 17.5 where this was working? Thank you.

    Dominik

Viewing 1 replies (of 1 total)
  • Hi Dominik,

    please use the following code to use shortcode in labels:

    add_filter('ppom_option_label', 'ppom_option_label_cb', 99, 4);
    function ppom_option_label_cb($label, $option, $meta, $product) { 
        
        $label = apply_filters('the_content', '[nm-shortcode]');
        return $label;
    }
Viewing 1 replies (of 1 total)

The topic ‘Shortcode in Option Labels?’ is closed to new replies.