PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.10.2
Subscriptions for WooCommerce with Stripe Recurring Payments v1.10.2
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / assets / js / admin-settings.js

admin-settings.js in Subscriptions for WooCommerce with Stripe Recurring Payments 1.10.2, at assets/js/admin-settings.js

17 lines 531 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // * ----- Disable Enforce Login based on Guest Checkout Setting ----- * //
2 jQuery(document).ready(($) => {
3 const guestCheckout = $("#wp_subscription_allow_guest_checkout");
4 const enforceLogin = $("#wp_subscription_enforce_login");
5
6 function toggleEnforceLogin() {
7 enforceLogin.prop("disabled", !guestCheckout.is(":checked"));
8 }
9
10 // Initial state
11 toggleEnforceLogin();
12
13 // On change
14 guestCheckout.on("change", toggleEnforceLogin);
15 });
16 // * ----- Disable Enforce Login based on Guest Checkout Setting ----- * //
17