• Resolved myaliasname

    (@myaliasname)


    Storing credit card information is critical to conveniently billing the client without the hassle of taking payment each week. Up until now I’ve been using a 3rd party Stripe Gateway that automatically lets me store CC info without prompting the customer.

    I am activating Woocommerce Stripe Gateway so that customers can pay via ApplePay, but when enabled, prompts the customer to check a box in order save credit card info on stripe servers. I want this checkbox to just be automatically checked and hidden because this is a part of our terms that they already have checked.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    We’re not planning to add this as an option just yet, if I’m not mistaken. If you’d like to see this happen you can submit that at ideas.woocommerce.com.

    Thread Starter myaliasname

    (@myaliasname)

    Thanks! Any code snippets I could use to enable the checkbox and hide it?

    Plugin Support Job a11n

    (@jobthomas)

    Automattic Happiness Engineer

    I don’t think we have any available. Sorry. With CSS (display:none) you can hide the option, and having it checked by default will require you to dive in the PHP.

    Thread Starter myaliasname

    (@myaliasname)

    I got the following suggestion for PHP file /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php but it removed ‘pay with CC’ option and deactivated the ApplePay button. Maybe someone can take a peek.

    public function save_payment_method_checkbox() {
    printf(
    ‘<p class=”form-row woocommerce-SavedPaymentMethods-saveNew”>
    <input id=”wc-%1$s-new-payment-method” name=”wc-%1$s-new-payment-method” type=”checkbox” checked=”checked” value=”true” style=”width:auto;” />
    <label for=”wc-%1$s-new-payment-method” style=”display:inline;”>%2$s</label>
    </p>’,
    esc_attr( $this->id ),
    esc_html__( ‘Save to account’, ‘woocommerce’ )
    );
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Saving CC Info’ is closed to new replies.