• Resolved 2Flow2

    (@emite)


    Hi there! I’ve read the pinned forum guideline post.

    I am just looking to get pointed to where I can customize the WooCommerce notice that comes up when there is an invalid payment method. (By default, this message reads “Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.“.)

    This message can come up for a variety of certification issues. I would just like to change what the text reads when that message comes up 🙂

    I’m assuming the trick is to hook into a filter somewhere in class-wc-checkout.php, I’m just not exactly sure where at the moment.
    Maybe around here, as a guess?

     ( ! isset( $available_gateways[ $data['payment_method'] ] ) ) {
    				$errors->add( 'payment', __( 'Invalid payment method.', 'woocommerce' ) );

    If anyone can point me to where I go to edit that message so that it says something else? 🙂 Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    I am just looking to get pointed to where I can customize the WooCommerce notice that comes up when there is an invalid payment method. (By default, this message reads “Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.“.)

    For changing text, we generally suggest using a translation plugin, such as Loco Translate. This will allow you to find that phrase and change it to be what you’d like.

    You can follow our step-by-step guide on how to do that here: https://docs.woocommerce.com/document/woocommerce-localization/#section-5

    Thread Starter 2Flow2

    (@emite)

    For changing text, we generally suggest using a translation plugin, such as Loco Translate. This will allow you to find that phrase and change it to be what you’d like.

    This worked like a charm, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to edit invalid payment message’ is closed to new replies.