| @@ 85-100 (lines=16) @@ | ||
| 82 | * |
|
| 83 | * @since 4.1.11 |
|
| 84 | */ |
|
| 85 | public function display_update_subs_payment_checkout() { |
|
| 86 | if ( |
|
| 87 | apply_filters( 'wc_stripe_display_update_subs_payment_method_card_checkbox', true ) && |
|
| 88 | wcs_user_has_subscription( get_current_user_id(), '', 'active' ) && |
|
| 89 | is_add_payment_method_page() |
|
| 90 | ) { |
|
| 91 | printf( |
|
| 92 | '<p class="form-row"> |
|
| 93 | <input id="wc-%1$s-update-subs-payment-method-card" name="wc-%1$s-update-subs-payment-method-card" type="checkbox" value="true" style="width:auto;" /> |
|
| 94 | <label for="wc-%1$s-update-subs-payment-method-card" style="display:inline;">%2$s</label> |
|
| 95 | </p>', |
|
| 96 | esc_attr( $this->id ), |
|
| 97 | esc_html( apply_filters( 'wc_stripe_save_to_subs_text', __( 'Update the Payment Method used for all of my active subscriptions (optional).', 'woocommerce-gateway-stripe' ) ) ) |
|
| 98 | ); |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Updates all active subscriptions payment method. |
|
| @@ 85-100 (lines=16) @@ | ||
| 82 | * |
|
| 83 | * @since 4.1.11 |
|
| 84 | */ |
|
| 85 | public function display_update_subs_payment_checkout() { |
|
| 86 | if ( |
|
| 87 | apply_filters( 'wc_stripe_display_update_subs_payment_method_card_checkbox', true ) && |
|
| 88 | wcs_user_has_subscription( get_current_user_id(), '', 'active' ) && |
|
| 89 | is_add_payment_method_page() |
|
| 90 | ) { |
|
| 91 | printf( |
|
| 92 | '<p class="form-row"> |
|
| 93 | <input id="wc-%1$s-update-subs-payment-method-card" name="wc-%1$s-update-subs-payment-method-card" type="checkbox" value="true" style="width:auto;" /> |
|
| 94 | <label for="wc-%1$s-update-subs-payment-method-card" style="display:inline;">%2$s</label> |
|
| 95 | </p>', |
|
| 96 | esc_attr( $this->id ), |
|
| 97 | esc_html( apply_filters( 'wc_stripe_save_to_subs_text', __( 'Update the Payment Method used for all of my active subscriptions (optional).', 'woocommerce-gateway-stripe' ) ) ) |
|
| 98 | ); |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Updates all active subscriptions payment method. |
|