• Resolved lunorag

    (@lunorag)


    Hi Mike,

    first let me thank you for this great plugin!

    I′m running into an issues: The attribute text appears twice. The first is as intended however the text appears a second time at the bottom of the product page.

    I switched from Elementar, where it worked flawlessly, to the new Avada Woocommerece builder.

    Any chance you could have a look at the issue?
    Thank you!
    Marco

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author mjke87

    (@mjke87)

    Hi Marco,

    The plugin makes of the the_content filter, to add the additional description. I suppose the Avada theme, call this filter twice, which isn’t great.

    The simple solution would be to remove the filter callback, after it was called the first time. Do have the possibility to add a code-snippet to your website? If yes, I can send you a snippet, this test if this solves the problem.

    Best wishes,
    Mike

    Thread Starter lunorag

    (@lunorag)

    Hi Mike,

    thank you for the fast reply!
    Yes I have total control and I’d be more than happy for the snippet.

    Plugin Author mjke87

    (@mjke87)

    Hi Marc,

    Alright, here’s the snippet, which simply removes the content filter, after it ran for the first time.

    add_filter('the_content', function($content) {
        if (class_exists('\MJJ\WooProductAttributeTab\Tabs')) {
            remove_filter('the_content', array(\MJJ\WooProductAttributeTab\Tabs::instance(), 'extend_product_description'), 99, 1);
        }
        return $content;
    }, 100, 1);

    Include this somewhere in your child theme, or theme—for example in the functions.php file.

    Please let me know if it worked, I might later include it in the plugin.

    Cheers,
    Mike

    Thread Starter lunorag

    (@lunorag)

    Works like a charm!
    Thank you so much for the immediate support.

    Plugin Author mjke87

    (@mjke87)

    You’re very welcome, glad I could help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Text is inserted twice’ is closed to new replies.