• 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 this 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.

    Thanks,
    D.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Tobo

    (@infonetzlichtcom)

    Do you found a solution?
    best

    I’d suggest posting your own topic in the WooCommerce sub-forum:

    https://www.ads-software.com/support/plugin/woocommerce

    Thread Starter dawko

    (@dawko)

    @tobo unfortunately haven’t found anything yet
    @wpyogi thanks, I’m going to post it there

    Thread Starter dawko

    (@dawko)

    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.

    @dawko, which file do we need to edit to do that?

    Thread Starter dawko

    (@dawko)

    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 should appear in wp-admin

    @dawko:
    thanks for the instructions. but I was not successful with doing the same. my ‘gateways’ folder was not nested in a ‘classes’ folder. I found it at wp-content/plugins/woocommerce/includes/gateways. there is no ‘classes’ folder in my woocommerce. I have version 2.1.2 installed.

    I did the modifications you suggested but no new payment gateways appears.
    woocommerce is not recognizing the new pis gateway…

    any ideas/hints?

    @dawko thank you very much. I was schratching my head for a realy long time for this solution. It works like a charm!

    @metasequoia: you also need to edit woocommerce.php and add a newly created gateway;

    $methods[] = 'WC_Gateway_PIS';

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