Skip to content

Commit 7ab21b4

Browse files
Fix phpstan error
1 parent f04d387 commit 7ab21b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/compatibilities/woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function should_load() {
2424
public function register() {
2525
if ( Optml_Main::instance()->admin->settings->use_lazyload() ) {
2626
add_filter( 'optml_lazyload_early_flags', [ $this, 'add_lazyload_early_flag' ], PHP_INT_MAX, 1 );
27-
if ( \Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils::is_cart_block_default() ) {
27+
if ( class_exists( '\Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils', false ) && \Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils::is_cart_block_default() ) {
2828
add_filter( 'image_downsize', [ Optml_Tag_Replacer::instance(), 'filter_image_downsize' ], PHP_INT_MAX, 3 );
2929
}
3030
}

0 commit comments

Comments
 (0)