Questions tagged [payment-method]
144 questions
2
votes
1 answer
How to load (multiple) defined Klarna payment methods?
I'm building a kind of sandbox integration of Klarna Payments (to get it working in principle and implement the logic later into a real shop). The first step described in the docu, the session creating, has worked. Now I'm trying to get the Klarna…

automatix
- 14,018
- 26
- 105
- 230
2
votes
1 answer
Fatal error issue with woocommerce_thankyou hooked function
I need to print different messages based on payment method on the WooCommerce thank you page.
I am using the code below but it crashes my website and show me the following error:
Fatal error: Uncaught Error: Call to a member function…
user13980604
2
votes
1 answer
Additional email recipient based on payment method Ids in WooCommerce
I am trying to add additional email recipient based on payment method Id on WooCommerce "New order" email notification.
Here is my code:
function at_conditional_admin_email_recipient($recipient, $order){
// if( ! is_a($order, 'WC_Order') ) return…

David Mbwana
- 57
- 1
- 8
2
votes
1 answer
Change specific payment gateway title in WooCommerce
I need to change the Woocommerce payment gateway names, not the ones hat are displayed on the frontend(this can easily be achieved in the settings) but the inernatl titles Woo is using.
In class-wc-gateway-cheque.php for example I found this
…

grolli
- 105
- 1
- 9
2
votes
1 answer
WooCommerce COD charges based on cart amount
I want to charge extra fee if any one select COD as payment method.
Suppose if the cart amount is 10 to 1000 INR COD charges will be RS.50/- and 1001 to 2000 then COD charges will be RS.100- and so on.
I am using "Add fee for Cash on delivery…

Ashish Singh
- 31
- 6
2
votes
1 answer
How to hide payment gateways for free products in WooCommerce?
I have a free product on woocommerce. But the stripe payment gateway ask for credit card payment even if it is free with a total of 0€. User can’t checkout without filling the stripe cc form.
Credit card info are not necessary when the product is…

Gauthier Buttez
- 1,005
- 1
- 16
- 40
2
votes
2 answers
Restrict payment gateways based on taxonomy terms in WooCommerce checkout
In my WooCommerce store I want to restrict and show payment gateway(cheque) only if the product has particular product category with the category ID "266". Now I have this snippet but it does the opposite - it disabled the gateway on the checkout…

Marko I.
- 542
- 10
- 38
2
votes
1 answer
Hide Cash On Delivery payment method for backordered cart items in Woocommerce
In Woocommerce I would like to hide Cash on Delivery payment method if any cart item is backordered, meaning if the customer add any items to cart which are allowed for backorders but have not enough stock regarding the added quantity.
My main…

Potter91
- 33
- 4
2
votes
2 answers
Custom checkout field enable or disable payment methods in Woocommerce 3
So i'm working on http://www.lichtunie.nl
We have a functioning checkout page with the needed fields.
The problem is this:
In the Netherlands (where we're based) We have something called KvK, if you start a company you need to register it there and…

Lex van Vliet
- 43
- 1
- 4
2
votes
0 answers
How to test browser functionality of popups using Chromedriver (such as for Payment Request API)
How can I write browser tests for modals like this?
In case it matters, I'm using Laravel 5.6 Dusk for browser testing, and my payment request modal is generated via a Stripe Payment Request Button.
Stripe's Payment Request Button uses the…

Ryan
- 22,332
- 31
- 176
- 357
2
votes
3 answers
Change orders status made with cheque payment method to "processing" status
I need to make WooCommerce push payments made by check into the "processing" status rather than the "on hold" status. I tried the snippet below however it doesn't seem to have an effect.
Here is my code:
add_filter(…

DarkSpartan47
- 153
- 2
- 16
2
votes
1 answer
Payment method form not visible before click
We have created custom payment method. The method contains inputs etc in its form.phtml file. In checkout, we get to Payment methods and our method is checked, but its form is not visible until we check it again. We can click continue, but it throws…

Jakub Gruber
- 745
- 1
- 11
- 27
2
votes
2 answers
How to use the attribute value for parent configurable product to take effect on simple products to restrict payment method
I am trying to implement the card only payment option for specific products (configurable products) in this magento (1.9.1) store. The problem i am having with the code that i am using is that i need to go to each simple product and update the…

AlphaOne
- 123
- 1
- 3
- 14
1
vote
2 answers
How to get the ID of a payment method in Woocommerce?
Maybe someone knows, how to add a condition: if the payment amount is less than 3000 - certain payment method is hidden?
For example, there are 2 payment methods:
cash
online payment
If the amount is less than 3000, the "cash" method is hidden.
As…

Stan Law
- 61
- 6
1
vote
1 answer
Add a confirmation dialog box for COD payment in WooCommerce Checkout
I'm using the following code on the checkout page to confirm the Cash on Delivery and proceed with the order, but even if the order is getting confirmed even if the visitor has not clicked on 'Confirm' button.
// Popup Confirmation
function…

Aryan Chaurasia
- 11
- 2