In Woocommerce, I am trying to hide the checkout postcode field if a specific city field is selected. I found a working code that hides the billing phone if company field is empty: I don’t know how to alter this code to make the required postcode field to be hidden when a specific billing city is select…
Tag: wordpress
insert into tables from another tables
Well, I trying insert into tables to another but I get this error; WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version …
Switch product image on hover on WooCommerce archive page
Is there a way (maybe via functions.php) to change the product-image in woocommerce shops (archive page) on hover with the first attached gallery image of the product? I cannot find how to target both. I guess it must be sth like this: Answer What I think you’ll want to do, assuming your installation is…
Add 50% discount per 3 products on the cheapest products (WooCommerce)
I’m adding the discount rule for every 3 products: 3,6,9,12,15.. on the cart and it should apply to discount 50% only the cheapest products. So if you have 9, only the 3 cheapest gets 50% off. This …
Check WooCommerce User Role and Payment Gateway and if they match – Apply fee
I’m struggling with applying a fee for an array of user roles if and when a specific payment gateway is selected. The code I’ve written works fine if I do not check the user role, but once I try and …
How to Assign a Gateway Fee in WooCommerce to Multiple User Roles?
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…
admin-ajax returning 0 – not submitting form data to db
I’m trying to send form data to a table called attendants. I have the form, the AJAX and query created, but when trying to test (when submitting the form), I see a POST http://localhost/rsvp/wp-admin/…
In a WordPress template, how can I detect if the current page is the WooCommerce cart or checkout page?
I would like to have a header banner hidden when a user is in the WooCommerce cart or checkout process. Is there a flag or variable that I can check to see if the current page is in either of these WooCommerce sections? I basically want to do something like the following: I realize I can make a custom page
How to implement photoswipe into wordpress custom theme?
I’m trying to implement photoswipe into my site but I’m not sure how to go about it for a wordpress site.. I’m using acf repeater to display all images in a grid. I’d like to display the photoswipe …
Gravity Forms add attachment to user notification
I am using the following code from Gravity forms to attach a file to the user’s notification: add_filter( ‘gform_notification_55’, ‘add_attachment_pdf’, 10, 3 ); //target form id 2, change to your …