diff --git a/changelog.txt b/changelog.txt index dce24b11c..159eb9603 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,6 @@ *** Changelog *** -= 1.9.5 - TBD = += 1.9.5 - 2022-11-01 = * Fix - Invalid tracking number in logs when adding tracking #903 * Fix - Tracking on Connection tab always enabled #900 * Fix - PUI payment instructions printed in the refund email #873 diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index 23c178dd7..89c62bf0c 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -23,6 +23,7 @@ use WooCommerce\PayPalCommerce\Button\Helper\MessagesDisclaimers; use WooCommerce\PayPalCommerce\Onboarding\Environment; use WooCommerce\PayPalCommerce\Onboarding\Render\OnboardingOptionsRenderer; use WooCommerce\PayPalCommerce\Onboarding\State; +use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper; use WooCommerce\PayPalCommerce\WcGateway\Admin\FeesRenderer; use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn; use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail; @@ -431,6 +432,9 @@ return array( '; }; + $subscription_helper = $container->get( 'subscription.helper' ); + assert( $subscription_helper instanceof SubscriptionHelper ); + $fields = array( 'checkout_settings_heading' => array( 'heading' => __( 'Standard Payments Settings', 'woocommerce-paypal-payments' ), @@ -644,7 +648,7 @@ return array( 'subscription_behavior_when_vault_fails' => array( 'title' => __( 'Subscription capture behavior if Vault fails', 'woocommerce-paypal-payments' ), 'type' => 'select', - 'class' => array(), + 'classes' => $subscription_helper->plugin_is_active() ? array() : array( 'hide' ), 'input_class' => array( 'wc-enhanced-select' ), 'default' => 'void_auth', 'desc_tip' => true,