• Resolved sbwd

    (@sbwd)


    I want to always save the customer’s payment info in stripe. I have the following line added in my functions.php:

    add_filter( ‘wc_stripe_force_save_source’, ‘__return_true’ );

    But it has no effect. What else can I do to force the saving of the customer’s payment info?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sbwd

    (@sbwd)

    I see in another thread I can add this code to have the ‘Save payment information to my account for future purchases.’ option be checked by default:

    add_action( 'wp_footer', function () { ?>
    <script>
    
    	/* Making new payment save checkbox checked by default */
    	jQuery('#wc-stripe-new-payment-method').prop('checked', true);
    
    </script>
    <?php } );

    However, I want it to be mandatory, so not even give the user the option to uncheck it. Is there a way to hide it? Though hiding it seems like maybe not best practice, so preferably is there a way to simply remove this checkbox entirely and always save the payment info? Which I think is what the snippet in my first post is supposed to do but it does not.

    Hi, saving of sensitive details such as credit card information, require a mandatory and explicit approval from the user. They need to be fully aware, and approve that their card details are stored, as a part of the payment gateway process. For this reason, the checkbox cannot be entirely removed.

    Thread Starter sbwd

    (@sbwd)

    Thank you Nagesh. What about if I remove the checkbox but include a note that informs the customer that their credit card info is being saved?

    Hi @sbwd,

    Good question. To be fair, we’re not legal experts so the legality of this is something you’ll want to check with an attorney in your area. If you do end up going that route, adding a note would be a good idea. You can use the payment gateway description to include those details. That would be a simple way to add this without needing to do any custom coding.

    Nicola Mustone

    (@nicolamustone)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to Always Save Customer Payment Info?’ is closed to new replies.