Support » Plugin: WooCommerce » Hide certain payment options when shipping method is selected

  • Hi there,

    I have renamed payment by Cheque to Pay in store, to have an option for customer to pay by cash in store. However I need it to be hidden when other shipping methods are selected (except pickup at store).

    Delivery shouldn’t have the option to pay in store.

    I was looking for a plugin to do that but surprisingly there is nothing out there.

    I found Local Pickup Plus however in the description wasn’t any info that you can pick certain payments for local pickup.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey guys,

    I have found a solution for this. I have duplicate the COD (Cash on delivery) class and renamed it to PIS (Pay in store) and all of the related commands renamed it as well.

    In WP admin under the Payment Gateways I now have the Pay In Store option and I can pick for what shipping method this gateway would be visible.



    I would need the same you did for an e-shop I make in my job… could you please tell me, what excatly you changet and where?
    Thank you for your help…



    In woocommerce plugin go to /classes/gateways/ and create a new folder called pis (pay in store).

    From cod folder copy the file class-wc-gateway-cod.php to the new created folder pis. Rename the file to class-wc-gateway-pis.php. Now open the renamed file and replace all cod to pis and Cash on delivery to Pay in store.

    Save the file and upload the new folder with the file to FTP and your new payment gateway will appear in wp-admin 🙂

    Lemme know if it worked for you.

    Hi… it didn’t appear… I replaced everything like you said, even checked it with the help of “find”… isn’t there anything else I need to do? Anything else I need to change?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide certain payment options when shipping method is selected’ is closed to new replies.