How do I conditionally stop woocommerce from saving shipping/billing addresses
I’m trying to write an Address book plugin that will allow users to add multiple shipping & billing addresses to their account so they can choose an address at checkout. I need to stop woocommerce from overwriting the default shipping/billing address when they use the edit-address form so I can save the new addresses separately. I know I could create a new form with its own logic in handling form submissions/saving addresses but I would like to stick with the woocommerce edit-address form if possible.
Woocommerce add an `aria-label` to the product loop item link anchor tag
I am using WooCommerce and want to add an aria-label
to the product loop item link anchor tag. Like:
Using woocommerce_loaded hook after data migration to fix variations
We have just mirigated nearly 6k products over from the live site. We are experiencing similar issues to the following post: Woocommerce: function to update all products. I’ve tried the fix mentioned in the post but it does not seem to fire when I go a product page. I’ve used query monitor and it is listing my call under the woocommerce_loaded hook but it does not fire.
Remove notice only for Composite Products in Woocommerce
I would like to only get a ‘Product is removed’ for the product type ‘Composite Product’. Currently, when I would remove a composite product in WooCommerce, it will display a notice for all child products that are removed in the cart. The only notice I would like to keep, is from the composite product itself.
Cannot send an argument to WooCommerce Admin notices in WordPress (Closure Function)
I cannot display an admin message by sending an argument to the function. It was suggested I use a closure function but this does not appear to work. Here is the code
Show newly created/split order and details on Woocommerce Thank You page
I am using a nifty piece of code (thanks 7uc1f3r) to split an order if it contains any backordered products: Split a WooCommerce order and create a new order if the original order has products in backorder.
This works great to create the second order at checkout, but it only shows the original order on the Thank You page. As mentioned by Pathfinder, there is a way to hook into the session data, pass the new order id, and show the newly created order details below the OG order table using woocommerce_after_order_details
.
WooCommerce. – calculate the shipping charge without tax in some condition
We need to calculate the shipping charge without tax in some condition on WordPress WooCommerce.
Accessing order item when using the woocommerce_hidden_order_itemmeta hook?
Is there a way to access the order item when using the woocommerce_hidden_order_itemmeta
hook? Is there a global $item
or something similar to declare?
woocommerce_product_get_weight not firing for variations (trying to override weight for shipping calculation)
It appears the woocommerce_product_get_weight hook that I have been using to override product weight (for the purpose of affecting the shipping calculation) is not firing for any of my product variations. It does fire for simple products though.
WordPress get order options from order object PHP
I am having issues trying to determine if a checkmark option was checked after an order is submitted using a hook. The current code is: