diff --git a/modules.php b/modules.php index 5f9d6ec94..c4065ea78 100644 --- a/modules.php +++ b/modules.php @@ -6,6 +6,7 @@ */ use WooCommerce\PayPalCommerce\PayLaterBlock\PayLaterBlockModule; +use WooCommerce\PayPalCommerce\PayLaterWCBlocks\PayLaterWCBlocksModule; use WooCommerce\PayPalCommerce\PayLaterConfigurator\PayLaterConfiguratorModule; use WooCommerce\PayPalCommerce\PluginModule; @@ -72,7 +73,9 @@ return function ( string $root_dir ): iterable { $modules[] = ( require "$modules_dir/ppcp-paylater-block/module.php" )(); } - $modules[] = ( require "$modules_dir/ppcp-paylater-wc-blocks/module.php" )(); + if ( PayLaterWCBlocksModule::is_module_loading_required() ) { + $modules[] = ( require "$modules_dir/ppcp-paylater-wc-blocks/module.php" )(); + } if ( PayLaterConfiguratorModule::is_enabled() ) { $modules[] = ( require "$modules_dir/ppcp-paylater-configurator/module.php" )();