diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ca081..86475ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Unreleased * Fix obsolete function calls +* Fix conflict in Elementor ### 0.4.7: January 31st, 2018 * **Tweak** - Remove automatic last-child bottom diff --git a/inc/plugins/woocommerce.php b/inc/plugins/woocommerce.php index 757d5ee..2c66aa4 100644 --- a/inc/plugins/woocommerce.php +++ b/inc/plugins/woocommerce.php @@ -4,12 +4,14 @@ * Remove Select2 / SelectWoo styles & scripts on the frontend */ function stormbringer_dequeue_select2() { - wp_dequeue_style( 'select2' ); - wp_deregister_style( 'select2' ); - wp_dequeue_script( 'select2' ); - wp_deregister_script( 'select2' ); - wp_dequeue_script( 'selectWoo' ); - wp_deregister_script( 'selectWoo' ); + if ( !wp_style_is( 'editor-preview', 'enqueued' ) ) { + wp_dequeue_style( 'select2' ); + wp_deregister_style( 'select2' ); + wp_dequeue_script( 'select2' ); + wp_deregister_script( 'select2' ); + wp_dequeue_script( 'selectWoo' ); + wp_deregister_script( 'selectWoo' ); + } } add_action( 'wp_enqueue_scripts', 'stormbringer_dequeue_select2', 100 );