# subscription/1.9.6/assets/js/admin-settings.js

Subscriptions for WooCommerce with Stripe Recurring Payments, version 1.9.6. 17 lines.

- Page: https://pluginprobe.com/plugins/subscription/1.9.6/code/assets/js/admin-settings.js
- Raw: https://pluginprobe.com/plugins/subscription/1.9.6/raw/assets/js/admin-settings.js
- Modified: 2025-11-20T05:49:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/subscription/1.9.6/code/assets/js/admin-settings.js#L10-L20`.

```javascript
// * ----- Disable Enforce Login based on Guest Checkout Setting ----- * //
jQuery(document).ready(($) => {
  const guestCheckout = $("#wp_subscription_allow_guest_checkout");
  const enforceLogin = $("#wp_subscription_enforce_login");

  function toggleEnforceLogin() {
    enforceLogin.prop("disabled", !guestCheckout.is(":checked"));
  }

  // Initial state
  toggleEnforceLogin();

  // On change
  guestCheckout.on("change", toggleEnforceLogin);
});
// * ----- Disable Enforce Login based on Guest Checkout Setting ----- * //

```
