Skip to content

Commit

Permalink
Fix conflict in Elementor
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Apr 16, 2018
1 parent c0295ab commit c0b94cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 8 additions & 6 deletions inc/plugins/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit c0b94cc

Please sign in to comment.