I’m building custom WordPress and WooCommerce theme and adding custom plus and minus buttons to Product page quantity field. The buttons do update quantity input’s value and I also receive “Item has been added to your cart” notification (on Product page) when I submit Add to Cart. But the ca…
Tag: woocommerce
Custom remove cart item functionality in Woocommerce
I have the add item function set-up, which looks like this:
Disable specific payment methods for specific shipping zones when cart subtotal reach a specific amount in Woocommerce
In Woocommerce, I’m trying to remove “Cash on delivery” payment method when cart subtotal is up to $250 for specific shipping zones names (Zone 1, Zone 4 and Zone 7). All others zones must not have …
Make US first in Woocommerce checkout countries select field
I already have US selected as my default country in the woocommerce checkout. In addition to that, I was asked to move ‘US’ to the very top of the country list in the checkout form. I created a new …
How to filter an object array in php by value of a parameter?
I’m new to php and I’m trying to filter an array of fields so that it only contains fields that have required property. In javascript I would do it simply by: fields.filter(field => field….
Passing the previous page title to a custom checkout field in Woocommerce
With Woocommerce, is it possible to pass the previous page title to a custom checkout fields?
Additional field on checkout for specific payment gateway in Woocommerce
I have a custom Woocommerce payment gateway and I need to add additional field on the checkout when the payment is selected. Basically, when the users click the custom payment gateway a “select” field should appear and they have to choose something from the select field. I have attached a screensh…
Remove some payment gateways if any coupon code is applied in Woocommerce
I started to work on small Woocommerce project. I have 3 payment gateways into this store: Paypal, Credit Card and Direct bank Transfer. What I would like is: If coupon code is used, I would like to disable (or remove) Paypal and Credit Card from available payment gateways, and just keep “Direct bank Tr…
Displays Woocommerce My Account Orders instead of Dashboard
I am trying to make it so that the url.com/my-account or the shortcode [woocommerce_my_account] displays the orders instead of the dashboard that displays “Hello User (not user)?”. The only thing I have is for after logging in which redirects to the orders instead of the dashboard, but I then goin…
Displaying product thumbnail and attribute in Woocommerce cart and checkout
I am isplaying product attributes in my Woocommerce checkout table, see my previous question: Show Woocommerce taxonomy in emails I also want to show the product image, so my ideal would be: Product …