Home Forums WoodMart support forum moment.js

moment.js

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #244075

    Sintarta
    Participant

    Hi
    How to disable moment.js library from loading?

    Thank you

    #244102

    Artem Temos
    Keymaster

    Hello,

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

    function woodmart_dequeue_script() {
            wp_deregister_script( 'woodmart-countdown' );
            wp_dequeue_script( 'woodmart-countdown' );
        }
    add_action( 'wp_print_scripts', 'woodmart_dequeue_script', 10020 );

    Regards

    #244132

    Sintarta
    Participant

    Thank you for your quick reply

    Im talking about this.

    Large JavaScript libraries can lead to poor performance. Prefer smaller, functionally equivalent libraries to reduce your bundle size. Learn more.
    Library
    Transfer Size
    Potential Savings
    moment
    70.4 KiB
    dayjs
    2.8 KiB
    67.6 KiB
    date-fns
    18 KiB
    52.3 KiB
    luxon
    20.4 KiB
    49.9 KiB

    From Google SpeedTest
    It seems your code has no effect
    Thank you again.

    #244136

    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 can check it?

    Thank you in advance

    #244141

    Sintarta
    Participant

    Sorry but i cant disable all plugins.
    It is a site in full working mode not in stagging.
    Is the another way to do that?
    It is not so critical…

    #244147

    Artem Temos
    Keymaster

    In this case, you need to create a staging development copy of your website. There, you will be able to do such kind of experiments without any harm to your production website.

    Kind Regards

    #244177

    Sintarta
    Participant

    Cache, its always the cache..
    Thank you…

    Kind Regards

    #244217

    Artem Temos
    Keymaster

    We are glad that you sorted it out.

    Kind Regards

Tagged: , ,

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

The topic ‘moment.js’ is closed to new replies.