Skip to content

Commit

Permalink
Boost: Remove woocommerce script exclusion from minify JS (#37735)
Browse files Browse the repository at this point in the history
* Exclude woocommerce file exclusion from minify

* changelog
  • Loading branch information
haqadn authored Jun 10, 2024
1 parent 8ede0e4 commit c732d0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 5 additions & 0 deletions projects/plugins/boost/changelog/remove-woo-compat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: removed
Comment: We previously excluded a woocommerce file from minification. It is no longer necessary.


13 changes: 0 additions & 13 deletions projects/plugins/boost/compatibility/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,3 @@ function ( $value ) {
}

add_filter( 'jetpack_boost_critical_css_post_type_query', __NAMESPACE__ . '\exclude_woocommerce_pages_from_query' );

function exclude_script_from_minify( $do_concat, $handle ) {

// Exclude the wc-blocks-vendors-frontend script from minification.
// The script has a regex that fails when being minified by JShrink/Minifier.
if ( 'wc-blocks-vendors-frontend' === $handle ) {
return false;
}

return $do_concat;
}

add_filter( 'js_do_concat', __NAMESPACE__ . '\exclude_script_from_minify', 10, 2 );

0 comments on commit c732d0b

Please sign in to comment.