WordPress.org

Forums

WooCommerce - excelling eCommerce
Hide certain payment options when shipping method is selected (5 posts)

  1. dawko
    Member
    Posted 1 year ago #

    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.

    Thanks,
    D.

    http://wordpress.org/plugins/woocommerce/

  2. dawko
    Member
    Posted 1 year ago #

    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.

  3. christineMirages
    Member
    Posted 1 year ago #

    Hello,
    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...

  4. dawko
    Member
    Posted 1 year ago #

    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.

  5. christineMirages
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic