Dequeue scripts and styles
-
Hello there,
which would it be the hook to dequeue styles and scripts here?
Thanks.
-
Hi @edeb,
Thanks for get in touch with us.
1. For dequeue script: “after_wcfm_load_scripts” hook can be use.
Code will look like in child theme:function wcfm_dequeue_script() { wp_dequeue_script( 'wcfm_products_manage_js' ); } add_action( 'after_wcfm_load_scripts', 'wcfm_dequeue_script' );2. For dequeue style: “after_wcfm_load_styles” hook can be use.
Code will be look like in child theme:function wcfm_dequeue_style() { wp_dequeue_style( 'wcfm_products_manage_css' ); } add_action( 'after_wcfm_load_styles', 'wcfm_dequeue_style' );If you have any further query please feel free to reach us anytime.
Thank You
So in particular I’m using a shortcode like you inserted in the latest release but the problem is that I have to dequeue its scripts and styles, as you suggested.
Now doing that I get this error
http://cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.6/plugins/wordpress/plugin.min.js?wp-mce-4603-20170530Failed to load resource: the server responded with a status of 404 (Not Found)What’s wrong? Can you suggest something?
I mean the request shouldn’t be printed at all…Thanks.
-
This reply was modified 8 years, 7 months ago by
edeb.
Hi @edeb,
AS we suspect this error is not coming from WCfM.
Yes we also enqueue “tinymce” but URL is different: “//cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.6/tinymce.min.js”
But if you dequeue “wcfm_products_manage_js” then it will not ask for “tinymc”. You may also dequeue tinymce using “tinymce_js” handler.
Please check in case is this from some other plugins or theme!!
Thank You
-
This reply was modified 8 years, 7 months ago by
WC Lovers.
Actually, removing the your shortcode the problem disappears… Not sure what’s happening.
Hi @edeb,
WCfM short codes and endpoints are rendered exact same way.
If our short code throwing this error then that endpoint page also have same issue.
Between, can you please share with us which short code you are using in?
Thank You
I’m using the following
<?php do_shortcode( '[wcfm endpoint="wcfm-products-manage"]' ); ?>Just About the Add Product Page.
Thanks.I see! I understand it’s not your problem. Just wondering how to fix it.
Thanks anyway for your support!Hi @edeb,
It’s pleasure to help you.
WE are just closing this thread now.
If you have any further query please feel free to reach us anytime.Thank You
@wclovers I’ve deleted your offer to login to your user’s site. I’m am 100% sure you mean well but please never ask for credentials on these forums.
Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.
If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.
Please be aware that repeatedly asking for credentials will result in us asking you to repeatedly stop before escalating up to the plugins team.
-
This reply was modified 8 years, 7 months ago by
The topic ‘Dequeue scripts and styles’ is closed to new replies.