variations

Create programmatically a WooCommerce product variation with new attribute values

假装没事ソ 提交于 2019-11-26 22:35:32
I have created a variable product ("parent" product) in WooCommerce version 3+. From a WordPress plugin, I would like to programmatically create the product variations ("children" product) with new attribute values. The variation attributes are already set in WooCommerce. So every time one variation is created, the new attribute's values should be created programmatically too and set in the parent Variable product. How can this be done? is it possible? Update : I had written more lines of codes on this that I wished, and tried many things to solve it, using woocommerce objects, and added

WooCommerce: trigger event after change of variation

放肆的年华 提交于 2019-11-26 19:12:47
问题 We use Woocommerce to sell colorboxes. Mostly the variable-product option is chosen. We added a modal dialog with a color palette, where the customer can chose a color from. This is next to the common dropdown of woocommerce. Problem is, when I pass the right SlugValue to the dropdown (after it gets chosen from palette) then the value in the dropdown is correct, but the event that need to be fired to publish the price doens't works. I already tried to fire the onchange event of the dropdown,

List of known “Safari on iPad” differences over “Desktop Safari”

旧巷老猫 提交于 2019-11-26 17:34:46
问题 In recently testing a web application on Windows/Mac desktop browsers - and then on an iPad I noticed various differences in Safari that I wasn't expecting. even though the version # is the same. I'd like to compose a list of those differences (for myself and others) to have as a developer reference. e.g. in Safari on the iPad iPad Safari takes full control of Select list/option styling iPad opens the onscreen keyboard when an input element receives focus, thus inline floating calendar

Move the variation price location in WooCommerce

你说的曾经没有我的故事 提交于 2019-11-26 17:25:50
问题 I'm have started building an e-shop in Wordepress with WooCommerce plugin. I added some products with variations and I noticed that the price is displayed after attributes select fields. Is it possible to move the price between Title and short description as for simple products? The url of one product is: http://www.roubinisideas.com/test2/product/uncategorized/vintage/ 回答1: Update (on September 2019) : Avoiding availability repetitions (bug solved on 2018) Keep other product types unchanged

Hide variation info from cart item title in WooCommerce 3+

会有一股神秘感。 提交于 2019-11-26 17:17:11
问题 Ever since we upgraded to Woocommerce version 3 our order confirmations are showing huge titles that include the variation detail. I don't like how it looks and it breaks some important functionalities in some custom-made plugins. Reference: Order Name Showing Variations since update to WC version 3 There is a filter that can be used to disable this data displaying in the title called woocommerce_product_variation_title_include_attribute_name from what I understand. But I have no idea where

Replace price range handling default variation displayed price in Woocommerce 3

廉价感情. 提交于 2019-11-26 17:08:47
问题 On our woocommerce website I am trying to update the displayed price based on the variations the customer selects from dropdown menus as shown here: I used a php function that had been submitted in another answer by LoictheAztec: Replace the Variable Price range by the chosen variation price in WooCommerce 3 add_action( 'woocommerce_before_single_product', 'move_variations_single_price', 1 ); function move_variations_single_price(){ global $product, $post; if ( $product->is_type( 'variable' )

Replace the Variable Price range by the chosen variation price in WooCommerce 3

亡梦爱人 提交于 2019-11-26 03:25:27
问题 On WooCommerce I would like to change the Variable single product page layout. Because, when you have an variable product you get this wired price rage ( below product title ) in the Variable Product page and it shows in the shop page as well. For me the standard way is to show the lowest price of the product in the shop as well as product page and change that price according to user selection of variables. I can\'t believe why. I can remove the price range and show the lowest price using