Make sure the PayLaterWCBlocksModule module gets loaded conditionally

This commit is contained in:
Daniel Dudzic 2024-04-10 14:18:58 +02:00
parent eb916a37a7
commit b6144a173f
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -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" )();
}
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" )();