• Resolved missmiss

    (@missmiss)


    Hello! Even if i’ve unabled the save cards on the plugin backend, in the front end it appears in the checkout page it the text and checkbox “Save card details for later” appear in the checkout gateaway. How can i remove that? Also i would like to change the lilac color of the plugin gateaway background and i don’t know where to find it.

    https://www.ads-software.com/plugins/stripe-for-woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s true, that’s always is appearing, even if you have unchecked the option.

    So yo can do that, go to classes -> class-s4wc_gateway.php

    In that file, line 396 you can find.

    public function save_card_option($default_fields, $id) {
    $default_fields[‘card-save’] = ‘<p class=”form-row form-row-wide”>
    <label for=”‘ . esc_attr( $id ) . ‘-save-card”>
    <input id=”‘ . esc_attr( $id ) . ‘-save-card” class=”wc-credit-card-form-save-card” type=”checkbox”>
    ‘ . __( ‘Save Card Details For Later’, ‘woocommerce’ ) . ‘
    </label>
    </p>’;
    return $default_fields;
    }

    So replace for this one

    public function save_card_option($default_fields, $id) {
    /*$default_fields[‘card-save’] = ‘<p class=”form-row form-row-wide”>
    <label for=”‘ . esc_attr( $id ) . ‘-save-card”>
    <input id=”‘ . esc_attr( $id ) . ‘-save-card” class=”wc-credit-card-form-save-card” type=”checkbox”>
    ‘ . __( ‘Save Card Details For Later’, ‘woocommerce’ ) . ‘
    </label>
    </p>’;*/
    return $default_fields;
    }

    All will work perfect if you don’t want to save and use any card.

    Thread Starter missmiss

    (@missmiss)

    Thank you i am gonna try! ??

    Thread Starter missmiss

    (@missmiss)

    It does not work, makes the checkout page go blank ??

    Ummm…that’s strange, for me is working perfect, but I was looking the code, and I think I know where’s the problem.

    Try this.

    Change this original code…

    public function save_card_option($default_fields, $id) {
    $default_fields[‘card-save’] = ‘<p class=”form-row form-row-wide”>
    <label for=”‘ . esc_attr( $id ) . ‘-save-card”>
    <input id=”‘ . esc_attr( $id ) . ‘-save-card” class=”wc-credit-card-form-save-card” type=”checkbox”>
    ‘ . __( ‘Save Card Details For Later’, ‘woocommerce’ ) . ‘
    </label>
    </p>’;
    return $default_fields;
    }

    For this one

    public function save_card_option($default_fields, $id) {
    global $s4wc;
    if ( $s4wc->settings[‘saved_cards’] == ‘yes’ ) {
    $default_fields[‘card-save’] = ‘<p class=”form-row form-row-wide”>
    <label for=”‘ . esc_attr( $id ) . ‘-save-card”>
    <input id=”‘ . esc_attr( $id ) . ‘-save-card” class=”wc-credit-card-form-save-card” type=”checkbox”>
    ‘ . __( ‘Save Card Details For Later’, ‘woocommerce’ ) . ‘
    </label>
    </p>’;
    }
    return $default_fields;
    }

    If this don’t work, I hope that yes, but if not, you temporaly can use CSS and adding to the css of the plugin wc-credit-card-form-save-card the property display:none;

    Try and tell me, regards.

    Plugin Author Stephen Zuniga

    (@stephenzuniga001)

    This is fixed in 1.38, no need for custom code

    Thread Starter missmiss

    (@missmiss)

    thank you i sent you the spanish translation by email to contribute

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘remove Save card details for later text and checkbox’ is closed to new replies.