• Resolved WP Native

    (@nazreenexe)


    Hey

    I’d like to disable all the payment method for certain vendor products so that customer can place an order without selecting any payment method (For such vendors products only)

    The reason why I would like to add is that there are certain vendors stock availability is subject to change, therefore we don’t want the customer to place an order with payment and revert back with a refund.

    I found this filter where it disables all the payment methods regardless of the vendor nor products and there are a few plugins too where you can disable payment methods on a single product basis. But this is not helpful since we have 3000+ products.

    add_filter( 'woocommerce_cart_needs_payment', '__return_false' );

    Is it possible to filter out all the payment methods based on author/vendor id’s?

    Please help ????

Viewing 1 replies (of 1 total)
  • Hello @nazreenexe,

    Unfortunately, there is no easy way to do it. You need to edit the add-new-product template to introduce a new option to disable payment. Later, on the check out page, you need to add a statement to check if the product has the ‘disable payment’ option enabled and you can call the above filter based on that.

Viewing 1 replies (of 1 total)
  • The topic ‘Disable payment method based on vendor product’ is closed to new replies.