This question already has answers here:
Add custom fields as cart item meta and order item meta in WooCommerce
(2 answers)
Saving a product custom field and displaying it in cart page
(1 answer)
Set product custom field and display value in cart, checkout and view order
(2 answers)
WooCommerce : Add custom Metabox to admin order page
(1 answer)
Closed 4 years ago.
I am developing plugins extending Woocommerce.
This plugins is for trip booking.
My objective is to get the customer information such as his arrival at airport and his next flight time, and show it during the checkout.
I know it can be added to the booking after checkout, but I need to show it somewhere before the checkout. Is there any Cart property i can use to store that information? I can't see anything suitable as per Class WC_Cart documentation.
Related
This question already has answers here:
Apply a fee to cart in Woocommerce
(1 answer)
Change Cart total using Hooks in Woocommerce 3.2+
(1 answer)
Closed 9 months ago.
I am looking for a solution to modify prices for WooCommerce fees, please let me know if there is any filter hook available to modify prices for WooCommerce fees.
WooCommerce uses the following function to add fees to cart.
WC()->cart->add_fee();
Many thanks
This question already has an answer here:
Add to cart and redirect to checkout for variable products in WooCommerce
(1 answer)
Closed 10 months ago.
How can i redirect customer to cart page after clicking on add to cart button for variable product?
I am using generatepress theme and https://wordpress.org/plugins/product-variant-table-for-woocommerce/ plugin for table view of product variation.
Regards
You can easily go to "WooCommerce > configuration > Products" and check "Move to cart after adding to cart" and save the settings.
This question already has answers here:
WooCommerce: Set country by default in checkout page
(5 answers)
Closed 1 year ago.
I have a WC shop that delivery to 2 countries in Europe. Issue I have is with unregistered users that don't have their data filled out yet.
I have countries A and B.
B is primary one, when user adds new item to cart he will see shipping for A, how can I set that if there is not data filled out to show shipping for B?
Order in my shipping tab is correct but for guests it always shows A as primary.
You need to go to your woocommerce settings and in the general settings set your store default country (red box at the top) and the set the default customer location to shop base address or you may use geolocation to get default customer location. Try this in incognito window in your browser and you will see it works.
This question already has answers here:
WooCommerce: Check if items are already in cart
(4 answers)
Closed 2 years ago.
On Wordpress, I'm trying to set a condition for displaying a widget if the woocommerce cart contains at least one product (any). I'm not sure which code to use, if anyone would like to help me out, Thanks in advance!
This could help:
if(WC()->cart && !WC()->cart->is_empty()){
// the cart has products
}
This question already has answers here:
Customizing my-account addresses fields in Woocommerce 3
(2 answers)
Add a custom field in Woocommerce Edit Account page
(1 answer)
WooCommerce Customer Billing Address
(1 answer)
Closed 5 years ago.
I have added a custom field to woocommerce checkout billing field. I want to add that custom field to edit address page from where user can update that field, which comes when user is logged in.
How to achieve this? Eg: I have to add a field before phone field on edit address page.