Home Forums WoodMart support forum bug with countdown timers

bug with countdown timers

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #253341

    mmounirf
    Participant

    Hello,
    I’m trying to create countdown timer as HTML block to use in popup. The counter is not visible in the popup and the browser console shows the following error
    Uncaught ReferenceError: moment is not defined

    Attachments:
    You must be logged in to view attached files.
    #253347

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin access so we could check it?

    Thank you in advance

    #253352

    mmounirf
    Participant

    all plugins not related to your theme has been deactivated and a new user has been created and credentials added to private content

    #253360

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    add_action(
    	'wp_enqueue_scripts',
    	function() {
    		wp_enqueue_script( 'woodmart-countdown' );
    	},
    	10001
    );
    #253379

    mmounirf
    Participant

    Thanks, now it works. I’m just wondering if this is something that will be included by default in the next update or this is just how it works? I mean should I keep this in my functions.php forever ?

    #253460

    Artem Temos
    Keymaster

    Yes, you need to keep the code if you want to use the countdown in the promo popup. Or you can enable Combine JS option in Theme Settings -> Performance.

Viewing 6 posts - 1 through 6 (of 6 total)