In WordPress Woocommerce checkout page I want to make field ‘billing_name’ not required if checkbox ‘buy_on_company’ is checked. I have managed to hide ‘billing_name’ in checkout page, but how to make it not required also? Answer I have done this: Now it doesn’t ask f…
Tag: woocommerce
Rename “Have A Promotional Code?” in Woocommerce
check please: http://www.baroniarialb.cat/finalitza-la-compra/ I have AVADA and Woocommerce theme installed, but I need to change the “Have A Promotional Code?” and I can’t find the correct code to do it. I have already tried different ways that appear on the internet without success from fu…
Schedule WooCommerce sale price based on days of the week
Running a restaurant delivery website, I would like to create sale products based on “days of the week”. Tuesday 5 products Wednesday 10 products Saturday 6 products For example, if Tuesday and product id is on sale, then sales price should be shown. I tried re-using this but can’t find a to…
How to upsell product in woocoomerce based on last product’s variation
I hope someone with more coding knowledge nouse will know more on how to tackle this little upsell issue I have in WordPress. The idea is in a side cart, based on the last product’s variation, it will show an upsell product in the side cart. Currently I am using a Woo side cart plugin that displays a ra…
wc_order_query with meta_query not working when using relation
I am trying to use WC_Order_Query, to get all orders where a custom meta_key doesn’t exist, is empty or equal to 0 I’ve tried like a lot of the stuff documented on this site, but nothing seems to work. It just returns all content, which is the opposite of what i’m trying to do. This is what …
Move “review tab” to position output of product sharing on WooCommerce single product page
I want to change the position of the “review tab” to the position below the share button on the right I removed the default “review tab” with this code and it worked But I don’t know how to re-add the “review tab” under the share button. Any advice? Answer To change t…
add a custom field on a specific product IDs woocommerce
I want to add a custom field “Product Description” on a specific set woocommerce products in functions.php. See below code: I don’t know what went wrong with the code as WordPress gives “There has been a critical error on this website.” Notice. I turned on WordPress Error Reporti…
Why Woocommerce update price programmically not working in woocommerce_add_cart_item_data hook
i have 2 type of products : 1- products that have regulare price 2- products that have calculated price i added some hidden field to product page form with below code : and send these fields data to cart item by : and at last using woocommerce_before_calculate_totals hook to change product price by this code …
Add to cart validation based on product attribute in WooCommerce
I’m trying to add a filter when a customer adds a product to the cart, to allow it or not. We just need to compare one attribute of the WooCommerce products. If cart is empty : Add to cart ok If cart has 1 or more items : check Attribute XXX value of products If Attribute value is the same
Show product titles to specific delimiter on WooCommerce category archive pages
My products have titles that include the delimiter | after which I enter some SEO keywords. Example product title Samsung UE55AU7172 | Smart 4K UHD 55 Can I force WooCommerce to show the product titles up to that delimiter in product category pages only? For example, the above product title in the product cat…