diff --git a/modules/ppcp-subscription/resources/js/paypal-subscription.js b/modules/ppcp-subscription/resources/js/paypal-subscription.js index 99c1cd630..7d848091f 100644 --- a/modules/ppcp-subscription/resources/js/paypal-subscription.js +++ b/modules/ppcp-subscription/resources/js/paypal-subscription.js @@ -11,6 +11,18 @@ document.addEventListener( children[i].querySelector('.woocommerce_variable_attributes') .getElementsByClassName('wc_input_subscription_period_interval')[0] .setAttribute('disabled', 'disabled'); + children[i].querySelector('.woocommerce_variable_attributes') + .getElementsByClassName('wc_input_subscription_period')[0] + .setAttribute('disabled', 'disabled'); + children[i].querySelector('.woocommerce_variable_attributes') + .getElementsByClassName('wc_input_subscription_trial_length')[0] + .setAttribute('disabled', 'disabled'); + children[i].querySelector('.woocommerce_variable_attributes') + .getElementsByClassName('wc_input_subscription_trial_period')[0] + .setAttribute('disabled', 'disabled'); + children[i].querySelector('.woocommerce_variable_attributes') + .getElementsByClassName('wc_input_subscription_length')[0] + .setAttribute('disabled', 'disabled'); } } } diff --git a/modules/ppcp-subscription/src/SubscriptionModule.php b/modules/ppcp-subscription/src/SubscriptionModule.php index 1ed3d75e5..d2077db06 100644 --- a/modules/ppcp-subscription/src/SubscriptionModule.php +++ b/modules/ppcp-subscription/src/SubscriptionModule.php @@ -842,12 +842,13 @@ class SubscriptionModule implements ModuleInterface { */ private function render_paypal_subscription_fields( WC_Product $product, Environment $environment ): void { $enable_subscription_product = $product->get_meta( '_ppcp_enable_subscription_product' ); + $style = $product->get_type() === 'subscription_variation' ? 'float:left; width:150px;' : ''; echo '
'; echo sprintf( // translators: %1$s and %2$s are label open and close tags. esc_html__( '%1$sConnect to PayPal%2$s', 'woocommerce-paypal-payments' ), - '