We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to pre-check the checkbox Apply this payment method to all active subscriptions?

In order to make this checkbox in the checkout pre-checked by default:

image-20200924-112532.png

You need to add ng-checked="true" to the checkbox in the following code in the Payment Components template:

HTML
<input type="checkbox" name="defaultPaymentMethodId" ng-model="cc.defaultPaymentMethodId"
                       id="default-payment-method-credit-card" ng-checked="true"/>
            <label for="default-payment-method-credit-card">
                       <t>Apply this payment method to all active subscriptions</t>

If you'd like to make this checkbox checked in My Account, you would need to edit the My Account Library Components and My Account Wallet Components templates and add ng-checked="true":

HTML
<div class="apply-this-method-checkbox">
                    <input type="checkbox" id="default-payment-method" ng-model="card.needToApplyDefaultPaymentMethod" ng-checked="true">
                    <label for="default-payment-method"><t>Apply this payment method to all active subscriptions</t></label>
                </div>

Last updated: