I’m trying to add dynamic discount to all products who have the tag: “bulk-discount” I want the discount to happen if a customer buys eg. 5 similar or different prducts with the tag. I’m working with this code. And this answer. This is what i have: Answer The first loop counts how many times the tag appears on a single
Tag: woocommerce
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
Woocommerce: How to display SKU for variable product options dropdown
How I can view the SKU code in the dropdown option for the variable products? I have tried to use this code but it is only to view the price option in woocommerce. Cause recently I use the other code …
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
PHP calculate past dates from today
I have created a PHP function that calculates how old a WordPress/WooCommerce order is. If the order is older than 90 days it should be canceled. The function used to work perfectly. However, since …
WooCommerce – Hide products with same title
I need to hide products with same title from shop page. I have many products with different SKU but same name. Is it possible to achieve that with a distinct function like this or should i create a …
Remove applied specific fee from Cart programmatically
I have applied a specific fee to my WooCommerce cart in the following way: WC()->cart->add_fee( __( “Delivery Fee”), 50); What the above code does is that in addition to the Subtotal and …
Woocommerce print simple product attributes on cart and checkout, like variable attributes
I want to show attibutes from a simple product, in cart and checkout. Just like variable products does, but there is only one attibute. See image below: Is this possible to achive with PHP? I was …
Search value of custom coulmn in Woocommerce Admin Orders list
I got a help from people here to create a coulmn in the woocommerce>orders table to preview the description of the first product in the order only. by the code below: Now how can i make it searchable …