I’ve built an online shop on WooCommerce that sells retail as well as wholesale. But credit card fees are so damn expensive. I’m happy to pay the credit card fees for my retail customers but I want to charge my resellers if they choose to pay by credit card. I managed to come up with the following code that works
Tag: hook-woocommerce
Show message on WooCommerce cart and checkout page when cart contains backorder products
I currently have this code in functions.php in order to display a message on the checkout page saying the customer has backordered products in their cart: What do I need to do to also have this same message display on the CART page? (Before going to Checkout). Thanks in advance. Answer Note 1: I changed the code so that it
WooCommerce Memberships: How to adjust query to account for delayed content/content drip?
I’m trying to build a query that shows the latest post a member has access to, but I cannot find what parameters to add so that posts that they have access to in the future are removed from this list. Does anyone know how to do this? If not, can wc_memberships_is_post_content_restricted( ) be adapted into a custom loop? EDIT I
Validate phone number in WooCommerce
I would like to add custom validation to the phone number (billing_phone) on the checkout page and the register page. With 05 Accept 10 numbers Validate phone number in woocommerce checkout page
Display custom order meta data value in email notifications WooCommerce
Based on the following code Add a custom checkbox in WooCommerce checkout which value shows in admin edit order I tried to add my_field_name to order confirmation email. As I understand I have to use woocommerce_email_customer_details. So I came to this solution, unfortunately without the desired result. Answer You have some minor mistakes, via the if condition “$email->id == …”
How to add a new field to my account details between other fields
With the snippet below we add a billing phone field to the account edit details. This works without problems, only we would have liked to add the new field between the email and the password change …
Add a custom fee for percentage and fixed cost to specific payment gateway in WooCommerce
In WooCommerce I need to apply a custom handling fee for a specific payment gateway. A custom handling fee for percentage cost and a custom handling for per fixed cost. I have this 2 pieces of codes: A) PERCENTAGE COST – function Result frontend B) FIXED COST – function Result frontend The two distinct functions work perfectly separately. Now, I
Change the order of admin billing address fields in WooCommerce orders
I have problem with woocommerce order in admin I want the billing_address_2 show at the end of the page as exmple bellow. can any one please help me.
WooCommerce action hook to redirect to new page on order failed
I want to redirect to a custom wordpress page if a customers woocommerce order fails. I have found and implemented the following code which redirects to a new page upon payment success. Is it possible to add to this code, so a failed order is sent to another specific url ? Answer Based on the code you have, you can
Product custom checkbox option that changes Woocommerce cart item price
The following code displays a custom checkbox before add to cart button on single product pages: Now I would like to trap/capture this checkbox option in Woocommerce session and then make a custom price calculations in the following code: What is missing is the part that will capture the checkbox option to set it in sessions, like: Any help is