I’m trying to restrict customers on my Woocommerce store to only be allowed to order products from 1 “supplier” at a time. I am defining the “Supplier” by a custom taxonomy called &…
Tag: cart
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
Show message on WooCommerce cart and checkout page when cart contains backorder products
I currently have this code in functions.php in order to display a message on the checkout page saying the customer has backordered products in their cart: What do I need to do to also have this same message display on the CART page? (Before going to Checkout). Thanks in advance. Answer Note 1: I changed the code so that it
Php cart session is not update the attributes, only the quantity
Im trying to update cart attributes but i don’t know why is not working, the quantity is updateing just fine but the nested attributes wont. I don’t figure’it out how to make this to work properly …
Bulk dynamic pricing for WooCommerce products with specific product-tag
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
Enable user local time in Woocommerce Cart and Checkout date time display
For a bookings website I have activated ‘Timezones’. The visitor’s local time should be displayed. In the booking form everything is working fine. The cart data ($start_time, $end_time) is not being …
Disable item name link for specific product in Woocommerce cart checkout and orders
I’m looking to disable the product link to the product page of a specific product in the cart. This product is a gift product automatically added to the cart when the cart subtotal amount equals a …
Change “You cannot add another (product) to your cart” notice in Woocommerce
I can’t find a way to change the Woocommerce default message when you try to add another product to your cart marked as sold individually. I found out that this is how you edit the default success …
Woocommerce cart items discount gets reset in checkout
I’ve been trying to implement a discount in my store with the following code: add_action(‘woocommerce_before_calculate_totals’, ‘set_discount’, 10 ); function set_discount( $cart ) { if ( …
Disable specific cart item quantity fields based on WooCommerce product category
In woocommerce I am using Hide “remove item” from cart for WooCommerce product category answer code and I would like to disable the cart quantity field too, avoiding customer to change the item quantity to zero. Is that possible? Any track on this will be appreciated. Answer The following code will remove the “quantity field” from cart for items from