Skip to content

Commit

Permalink
Fixed: with proxy disabled, external JS library wasn't excluded from …
Browse files Browse the repository at this point in the history
…SG optimizer.
  • Loading branch information
Dan0sz committed Aug 28, 2023
1 parent b02ac9b commit d1566f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Includes/Compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ public function __construct() {
}

// SG Optimizer
if ( defined( 'SiteGround_Optimizer\VERSION' ) ) {
if ( defined( '\SiteGround_Optimizer\VERSION' ) ) {
add_filter( 'sgo_javascript_combine_exclude', [ $this, 'exclude_js_by_handle' ] );
add_filter( 'sgo_js_minify_exclude', [ $this, 'exclude_js_by_handle' ] );
add_filter( 'sgo_js_async_exclude', [ $this, 'exclude_js_by_handle' ] );
add_filter( 'sgo_javascript_combine_excluded_inline_content', [ $this, 'exclude_plausible_inline_js' ] );
add_filter( 'sgo_javascript_combine_excluded_external_paths', [ $this, 'exclude_plausible_js' ] );
}

// WP Optimize
Expand Down

0 comments on commit d1566f8

Please sign in to comment.