Questions tagged [payment-method]

144 questions
1
vote
2 answers

Shipping discount based on chosen payment method in WooCommerce

I'm currently trying to apply a discount on shipping if a customer chooses a certain payment method. For some reason, this applies the discount regardless of which payment method is chosen. The code I'm using in functions.php is: function…
1
vote
1 answer

Keep only a specific payment method for Local Pickup shipping method in WooCommerce

function my_custom_available_payment_gateways( $gateways ) { $chosen_shipping_rates = WC()->session->get( 'chosen_shipping_methods' ); // When 'local delivery' has been chosen as shipping rate if ( in_array( 'local_delivery',…
Anderson
  • 23
  • 4
1
vote
1 answer

Limit BACS "on-hold" orders to only one by customer in WooCommerce

We offer BACS (bank transfer) as a payment method on our WooCommerce store. If someone uses that method: stock is reduced for that product order is on-hold for 48 hrs The issue we are having is that some people take advantage of that and they use…
1
vote
1 answer

Disable payment methods based on WooCommerce cart total

I tried this code below to hide/disable Credit/Debit card and Direct bank transfer payment method on Woo commerce(WordPress) when the checkout total == 400 but did not work. Please any idea on how to achieve this? Thank you so kindly. function…
1
vote
1 answer

How to auto-process WooCommerce orders except for BACS payments?

I would like to change the woocommerce order status auotmatically from "on-hold" to "processing" for every new order, except for payment method BACS (Direct Bank Transfer). I already found this code, but do not know how to adapt it to exclude…
wpabud
  • 23
  • 3
1
vote
1 answer

Allow customer to pay by cheque if their account is approved in WooCommerce

By default the store only accepts credit card but I need to allow some pre-approved customers to have the ability to pay by check. I got this working with a custom user role and the following code: add_filter(…
user1822824
  • 2,478
  • 6
  • 41
  • 65
1
vote
1 answer

Add a fee based on chosen payment gateways and user roles

I am using Check WooCommerce User Role and Payment Gateway and if they match - Apply fee answer code, and fee is added according to user role ok, but when customer confirms payment, fee is not charged. In my case payment gateway is MercadoPago,…
1
vote
1 answer

Remove WooCommerce Payment Gateways for defined groups of product categories

I've manged to get this code to work for removing ONE payment gateway based on one or more product categories. What I need help with is removing multiple payment gateways as well. In other words; it should remove one or more payment gateways based…
user13639445
1
vote
0 answers

Stripe- Send Payment to Customers [Alternates]

As per this link, it is not possible with stripe to make payouts for customers. Stripe- Send Payment to Customers We are making a system like a lottery. We will collect payment from customers and then draw a customer from them, for payout. If…
Sheikh Abdul Wahid
  • 2,623
  • 2
  • 25
  • 24
1
vote
0 answers

Display payment list in drop-down on checkout page in Magento 2

I am working on customization of checkout page in Magento 2. My Magento version is 2.3.2 Currently I am stuck at display payment methods list in Magento 2. Here is what displaying currently. Here is what I want to achieve. Note: I have overridden…
1
vote
1 answer

Add a column for a payment gateway on admin Orders list in Woocommerce

I have a custom payment gateway plugin which i need to include a custom column in woocommerce order list will show transaction status from payment gateway. Is there any hook available to write this code inside the payment gateway plugin? class…
1
vote
1 answer

Hide payment instructions from WooCommerce email completed order notifications

In my woocommerce store I have activated the payments instructions and they are displayed on all email notifications. I have the following code (taken from another answer), that remove payment instructions for "COD" payment method: add_action(…
1
vote
1 answer

Only show BACS payment gateway for logged in users if a coupon is applied to cart in WooCommerce

The code I have works for hiding the BACS payment gateway for guests and customers, but I need to change it so that the BACS gateway only becomes available IF the customer/admin apply a certain coupon code called FOOD on the CART or CHECKOUT. In…
user11391182
1
vote
1 answer

Hide payment methods based on selected shipping method in WooCommerce

I was trying to hide two payment method if one shipping method selected by adding code below to theme function.php // Filter payment gatways for different shipping methods function my_custom_available_payment_gateways( $gateways ) { …
1
vote
1 answer

Disable specific plugins for unlogged users in WooCommerce

I am trying to disable WooCommerce PayPal Checkout Payment Gateway for unlogged users. How can I do that?