Support » Plugins and Hacks » WooCommerce » payment methods by product category

payment methods by product category

  • Hi all,

    is there a safe way to define payment methods per product category in WooCommerce?

    My client has some products that can only be bought using COD, while most products in the shop also accept credit cards and even payment on the premises.

    I’ve searched the plugin pages and haven’t found anything yet.

    Thanks a lot in advance for any help or hint.


Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m trying to convert this code to product_category:

    function filter_gateways($gateways){
    global $woocommerce;
     foreach ($woocommerce->cart->cart_contents as $key => $values ) {
    //store product id's in array
    $highpriceditems = array(56,57);			
    return $gateways;

    From this post

    @qrafts – I added code that does what you want to the post you referenced.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘payment methods by product category’ is closed to new replies.
Skip to toolbar