I am using below script under my WordPress child theme functions.php to overwrite price, but below code is affecting to all the products. Can you please help me “not to run” below code if the product is under some specific “shirts”, “games” category? Above code is working smoothly for all the products but I don’t want to run this code
Tag: woocommerce
Change product stock availability texts in Woocommerce
I am trying to change the in stock text next to the quantity available in woocommerce. I am using the stock management in product variations. I tried this code below: The code above changes the text but it does not pull in the stock quantity number from the variation stock manager. Any help is appreciated. Answer The following code will
Add the variation price to variable product dropdown item names in Woocommerce
I’m using this code to get the variable product options I tried a lot of codes to get price next to the name in dropdown menu , but nothing get right Answer It will only work if you have just one product attribute for variations set in the variable product (so only one dropdown). If you have more than one
Shipping cost discount based on a shipping classes in Woocommerce
I’m trying to apply a discount to one shipping class for products currently in a cart. This is applied on the checkout view. In Woocommerce backend, the option is set to charge each shipping class individually. Also, I use only one shipping method named “flat rate”. Based on Override all shipping costs for a specific shipping class in Woocommerce, the
Custom “Terms and Conditions” acceptance checkbox in Cart page Woocommerce
Works on small home project, and want to add checkmark option bellow “Proceed to Checkout” button into Cart page into my Woocommerce site. I found this function, that is add that option: …
Woocomerce Remove a specific cart items when adding to cart another specific items
Provided solution here Remove a specific cart item when adding to cart a specific product in Woocommerce works perfect for one product id. Is any way to do this for multiple id’s? Answer Update 2 : The following code will work for multiple product IDs: Code goes in function.php file of your active child theme (or active theme). Tested and
Add customer email and phone in “Order” column to admin orders list on Woocommerce
I am trying to find a way on how to add the customer phone and email below the name on the WooCommerce order view. See picture for reference where I need to add this information. Any ideas, tips or …
Filter out unwanted order item meta data from Woocommerce email notifications
In the order email templates (for example email-order-items.php), WooCommerce uses the function wc_display_item_meta to display product details in the order table. The function code is present in the wc-template-functions.php file (line number 3011). I am copying the function code below for reference The problem is: it doesn’t take any arguments that can help me filter out item data that I
Disable all payment gateways except BACS based on geo-ip country in Woocommerce
In Woocommerce, I am using the code made from this answer thread which enables ALL payment gateways if the user’s GEO IP is from an array of allowed countries. Here the allowed country code that I …
Pass custom product meta data to the order in Woocommerce 3
In Woocommerce, I’m attempting to add a piece of custom meta to my products and I would like to pass it through to orders. We have a substantial amount of products and they are accountable to different cost centers so I need a select box inside the product admin that we can choice the cost centers that passes a value