Skip to content
Advertisement

Tag: product

Set variations default attributes values for a variable product Programmatically

I’m building a site where WooCommerce Variable products (with Products Variations) are inserted programmatically. I have followed this tutorial successfully: Insert WooCommerce Products & Variations Programmatically I need just something that is missing: How to set variations default attributes values for a variable product? Is it possible? Answer 1). You will need to insert in your json data for each

Change product prices via a hook in WooCommerce 3+

IN WooCommerce, I need to multiply all product prices by a number. So I have used the following (via a plugin): But, that doesn’t work for variation products. I have tried the following hooks with no luck: The only one that works half way is this one: But that just changed the overall price, not the selected variation price. See

Advertisement