Do not render PayPal subscription button if no plan is connected

This commit is contained in:
Emili Castells Guasch 2023-06-07 12:50:18 +02:00
parent af5d33dc78
commit 5082a0d17b
7 changed files with 94 additions and 41 deletions

View file

@ -15,7 +15,7 @@ use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository;
return array(
'subscription.helper' => static function ( ContainerInterface $container ): SubscriptionHelper {
return new SubscriptionHelper();
return new SubscriptionHelper( $container->get( 'wcgateway.settings' ) );
},
'subscription.renewal-handler' => static function ( ContainerInterface $container ): RenewalHandler {
$logger = $container->get( 'woocommerce.logger.woocommerce' );