• Hi Kadence theme

    First, context. I’m an author of a WP Full Picture plugin which, among other things, displays cookie consent banner and uses WP theme customizer to style it.

    Unfortunately, the HTML of my plugin shows during the email customization in your email designer. Can you please tell me how to disable loading my plugin’s scripts and HTML when your customizer is being loaded? Is there any PHP function I can use to do it?

    I can provide you with more technical information if you need. Just ask.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Gilbert Hernandez

    (@ghernkadence)

    Hello @chrisplaneta

    I downloaded and installed your plugin on my test site alongside the Kadence WooCommerce Email Designer. However, I haven’t been able to spot HTML that you have described while editing the WooCommerce emails. Could you provide more information on how to recreate the problem you’re having? Are there settings I need to enable in either plugin, or do you have screenshots that show the HTML?

    Thread Starter Krzysztof Planeta

    (@chrisplaneta)

    Hi Gilbert.

    Of course. You need to go to the “modules” page in WP Full Picture and enable the module “Consent banner” and one for tracking – for example “Custom scripts”. Then, when you go to the email designer, you will see the HTML of the banner right below the email template.

    Here’s the screenshot of how it looks like: https://prnt.sc/IiIUeceW2TBX

    Thank you for your help

    Have a nice day
    Krzysztof Planeta

    Plugin Support Gilbert Hernandez

    (@ghernkadence)

    @chrisplaneta

    Well, you’ll want to perform some checks in your plugin when you output your HTML. For example, I found a function called output_notice_html() in the file at wp-content/plugins/full-picture-analytics-cookie-notice/public/modules/cook/fupi-display-cookie-notice.php. I changed the code to the following:

    public function output_notice_html() {
    if( class_exists( 'Kadence_Woomail_Preview' )) {
    return;
    } else {
    include_once FUPI_PATH . '/public/modules/cook/fupi-display-cookie-notice.php';
    }
    }

    This seemed to remove the HTML from the customizer. While this likely isn’t the most efficient way for you to accomplish this goal, it does demonstrate a solution. The function checks for the Kadence_Woomail_Preview class, which is loaded when you’re previewing the email customizer. If the class exists, it does not load the HTML from the consent banner module in your plugin. You may need to check for the class wherever you echo out HTML that may appear in the customizer, or at some point in your logic.

    Please let me know if this helps you or if you have additional questions.

    Thread Starter Krzysztof Planeta

    (@chrisplaneta)

    Hi Gilbert

    Unfortunately, using this solution makes the banner disappear from the website completely when Kadence’s plugin is installed.

    I may have another solution.

    It seems you do not use in the email “page” the wp_head hook but you use the wp_footer hook. But do you actually need the bottom one? I noticed that some other people also had problem with extra texts in the customizer. If you removed the bottom wp_footer hook the problem would be fixed for everyone. What do you think?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.