Closed dylan-ngo11 closed 8 years ago
I can't reproduce it https://vid.me/nNDI
Sorry, I found that not woocomerce, please test with this plugin: https://wordpress.org/plugins/yith-woocommerce-wishlist/
Please report this problem to plugin author.
It seems that they don't give the support. So I tried to deregister this js file in Edit page. I tested this code but it didn't work.
add_action( 'admin_enqueue_scripts', 'topseo_deregister_woocommerce_setting', 10, 1 );
function topseo_deregister_woocommerce_setting(){
wp_deregister_script( 'woocommerce_settings' );
}
any suggestions?
I opened a ticket https://wordpress.org/support/topic/please-remove-unecessary-scripts/
@danyj If you see the history of support forum, I don't think the author take the support. That's why I try to figure out the solution.
try this
add_action( 'admin_enqueue_scripts', 'topseo_deregister_woocommerce_setting', 99);
I used that to remove jquery-ui-style
if( is_admin() ){
function _thz_action_remove_woo_jquery_ui_css() {
if ( class_exists( 'WooCommerce' ) ) {
wp_dequeue_style( 'jquery-ui-style' );
}
}
add_action( 'admin_enqueue_scripts', '_thz_action_remove_woo_jquery_ui_css', 99 );
}
are you sure that the handle is woocommerce_settings ?
https://github.com/ThemeFuse/Unyson/issues/1822#issuecomment-238208119
I checked in page source and it was right.
I don't know why but change to 99 and it works. I set 100 in the beginning but It did not. Thank @danyj
So now it's my solution for this problem. Hope it helps someone!
add_action( 'admin_enqueue_scripts', 'topseo_deregister_woocommerce_setting', 99 );
function topseo_deregister_woocommerce_setting(){
$screen = get_current_screen();
if ( $screen->post_type == 'page' ){
wp_deregister_script( 'woocommerce_settings' );
}
}
Many thanks to @duongancol , it works, i'm finding detailed reason to customize it fit with my project.
@tuan-ph You're welcome, bro!
thanks @duongancol!
@biklik You're welcome.
The color picker doesn't work well when Woocomerce plugin is activated. I think it must be conflict with woocomerce plugin javascript file. Please see the video here: http://take.ms/gvqkI