Questions tagged [product-variations]

This tag should be used with the [woocommerce] tag — and should not be used if the [woocommerce] tag is not applicable. It should be used for questions about the WooComerce Variations feature, aka Product Variations or Variable Product.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
28 views

Dynamic Display of Product Content in WooCommerce Product Description [closed]

I am facing an issue with dynamically displaying the colors variations of a product and his price in a product bloc description. I want to automatically show the available color variations for each ...
Miguel's user avatar
  • 1
-2 votes
1 answer
21 views

Woocommerce remove attributes option used for variations

I have a woocommerce with a lot of products and they have 6 attributes used for variations: attribute_pa_color attribute_pa_acabado attribute_pa_textura attribute_pa_material attribute_pa_color_basico ...
Oterox's user avatar
  • 648
1 vote
1 answer
40 views

WooCommerce shortcode showing the current quantity in cart badge for specific product

I'm trying to create a custom WooCommerce shortcode (with a 'product id' attribute in the shortcode) that will display the current quantity that the customer currently has in their cart of that ...
Drew Parsons's user avatar
0 votes
0 answers
23 views

How to display user input field when selecting variations on Woocommerce?

I have some variable products with the same characteristics. They are t-shirts and have 3 variations (simple / monogram / full name) so the user can selected what he wants to get printed on the tshirt....
ADbeat's user avatar
  • 1
1 vote
1 answer
49 views

Different Product Variation Price Based On User Role In WooCommerce

Scenario 7 custom roles in 2 categories are built to serve B2C clients with subscriptions and B2B distributors, which are: B2C subcription_tier1 / subcription_tier2 B2B distributor_tier1 / ...
Henry Hu's user avatar
0 votes
0 answers
30 views

Redirect SKU from URL directly to specific product variation in WooCommerce

I want to be able to open product page directly from URL by SKU (/?sku=GIVEN_SKU). This code works well, but only for normal products: add_action('template_redirect', 'sku_url_redirect'); function ...
micha's user avatar
  • 39
0 votes
1 answer
44 views

Get the product attributes for variations from WooCommerce variable product

For a WC plugin I'm working on, I need to find the attribute that defines the variations of a product. So, suppose we have a variable product that has attributes likes Color, Size, Material, but only &...
Faye D.'s user avatar
  • 905
0 votes
0 answers
52 views

How to display a thumbnail of product variation in custom table? I just make a custom variation table in woocommerce

I created a custom variation table in WooCommerce, and I need to display product variations thumbnails in that custom table. What is it the right way? What is the code to create this? Here is a ...
italywebonline's user avatar
0 votes
1 answer
56 views

Adding a fee to WooCommerce product variation passed to cart

I am trying to add a fee (20$) to a product when I add it to the cart. My function works when the product is a simple product. But not when it is a variation product. I have tried the following code, ...
PatInParis's user avatar
1 vote
1 answer
42 views

Bug in custom fields when reordering product variations Woocommerce

In the first function I only create the custom fields to each product variation: add_action('woocommerce_admin_process_variation_object', 'save_custom_variation_fields', 10, 2); function ...
Davi Davi Amrico Amrico's user avatar
1 vote
1 answer
70 views

How to Copy a Woocommerce Product's Variations From One Product to Another

I am trying to copy a products variations using PHP from one existing product to another. This way I can copy the variations without duplicating the exact product and having to re input the other non ...
Enjabain's user avatar
  • 193
-3 votes
1 answer
79 views

Don't allow users to deselect variation swatch in WooCommerce

On our website for our brand Keylight we use the plugin Variation Swatches and Photos to let the customer select different variant options via color and image swatches. Every product has a default ...
Keylight Tim's user avatar
1 vote
1 answer
64 views

Hide out of stock variations in WooCommerce variable product pages

I am working on WooCommerce Footwear Shop and my client has a requirement about variation. He wants to hide out of stock variations. Currently, I have added a filter to gray out add to cart button, ...
Enes Bajrami's user avatar
1 vote
1 answer
67 views

Handling WooCommerce selected variation for a custom button with an external link

I'm encountering an issue while trying to implement a "Buy on Amazon" button on my WooCommerce product pages. The problem is that for variable products, the button consistently links to the ...
MSadm's user avatar
  • 11
0 votes
0 answers
45 views

Show product gallery with swatches in shop/archive page WooCommerce

I have a WooCommerce website and im using this plugin for swatches and gallery for each product variation https://plugins.innovativewp.org/iwp-swatches/shop/ What the plugin does is, in shop or ...
Abdallah Mohsen's user avatar
0 votes
1 answer
36 views

Handle variable product custom input quantity arguments in WooCommerce

I have a store set up in WooCommerce that requires product quantity to increase in steps of 6. We set it up that way with a code that is dependant on each product slug individual slug. It works fine ...
Ñako's user avatar
  • 35
2 votes
1 answer
39 views

Display in stock variations attributes for variable products in WooCommerce archive pages

I wanted to show on my shop page attributes of available product's variations (ones that are in stock). My code does the work, but instead of attribute names I get attribute's shortened names and it ...
Luiza Gojawiczyńska's user avatar
0 votes
0 answers
14 views

I need to update the variant weight and id to get the right shipping estimate on a Shopify product page

I have created a shipping estimator for the product page of Shopify, the estimator works for the product/variant ID that the page originally loads with, but not when you select a different variant ...
Chris Harding's user avatar
-2 votes
1 answer
27 views

remove the woocommerce slider and simply display the images (variable product)

I use the "WooCommerce Additional Variation Images" plugin to add additional images to my variable products. I also use "Product Variation Swatches for WooCommerce (Pro)" to give ...
steven etienne's user avatar
0 votes
0 answers
22 views

In WooCommerce, how to add a variation-specific (not product-specific) downloadable (PDF) file to a product page?

I am making a WooCommerce store to sell physical products. Each product has multiple variations (Size, Color, etc.). I want to add a downloadable PDF file that would be specific to each variable (...
Félix Poirier's user avatar
0 votes
1 answer
112 views

Show all available variations on archive pages with a button linked to WooCommerce single product

In WooCommerce, I want to show all available variations of a product in shop and archive page as separate products, so that user can see all available color options without going to details page. i ...
Harish Ksoft's user avatar
0 votes
1 answer
76 views

Set the variation with highest discount percentage as Default in WooCommerce

I found Set the highest priced variation as default in WooCommerce variable products answer code that is working perfectly on my side. I would like to make some changes: I would like to set the ...
Lupani's user avatar
  • 13
0 votes
1 answer
44 views

has_term() conditional function usage with WooCommerce cart and order items

I have created various products in WordPress using the WooCommerce plugin Now, for each category of products, I have considered some personal fields For example, products in the online game category ...
REZA SAEEDI's user avatar
2 votes
1 answer
74 views

Display attributes term description for the selected variation in woocommerce

In WooCommerce under Products > Attributes > [Name of Attribute] > Add New [Attribute Variation] there is a section titled "Description", how to display the description attribute ...
Yudi's user avatar
  • 159
1 vote
1 answer
40 views

Avoid product variation purchases when stock quantity is below 3 in WooCommerce

When a product variation has an inventory of '0' it is not purchasable When a product variation has an inventory <= 2 it is not purchasable When a product variation has an inventory >2 it is ...
swagIT's user avatar
  • 13
0 votes
1 answer
177 views

How to query "variable products with sale price" in woocommerce?

How to query "variable products with sale price which are in stock" in woocommerce? i didnt get any result so far. i use Jet-Engine to create custom query but it would be enough for me if ...
user9949560's user avatar
1 vote
2 answers
62 views

Display specific variation products as individual products on a new page using a shortcode in Woocommerce

I want to display only a specific variation of all my products on a page using a shortcode. In my example, I want to display all the variation products with the attribute "color" and the ...
Michele's user avatar
  • 37
0 votes
0 answers
48 views

variation product attribute dropdowns display the attribute slugs instead of names

To change the behavior of WooCommerce's variation product attribute dropdowns (when editing product) to display the attribute slugs instead of names, we need to modify the wc-enhanced-select.min.js ...
alench's user avatar
  • 69
1 vote
1 answer
94 views

Show a custom text on WooCommerce variable products when no variation is selected

I have a product with different variations. To choose an variation two select fields have to be filled. However, the availability message is only shown when both select fields have a option selected. ...
mokorana's user avatar
  • 150
0 votes
0 answers
25 views

Wp sheet editor plugin export issue

I am using Wp sheet editor pro plugin to edit the variations and attributes which i have 700+ products on my website. I have imported the content from my shopify store to WooCommerce store. By default ...
Divya's user avatar
  • 1,479
0 votes
0 answers
25 views

Setting only available variation automatically in woocommerce

In woocommerce my goal is to set the variation attribute automatically if it's the only one available. I partially found a way to do it but strangely it only works with the first LI if I click on a ...
Mantas's user avatar
  • 169
1 vote
1 answer
93 views

How to get product variation attribute slugs from Woocommerce cart items

I need to check the cart to see if a specific product attribute has been added on any product. (This is within a customized shipping function hooked to woocommerce_package_rates. ) I have the ...
AJD's user avatar
  • 403
1 vote
1 answer
137 views

Hide displayed variation cutom fields data when empty in Woocommerce

I add custom fields to product variations (thanks to this post) I add this code in wp-content\themes\my_theme\woocommerce\single-product\add-to-cart\product-attributes.php template: <?php /** * ...
Mauro Beretta's user avatar
1 vote
1 answer
120 views

Change "out of stock" message in WooCommerce variable products

We have a WooCommerce store with lots of variable products, and have added custom texts for stock statuses. I have managed to change all of the various stock statuses, when selecting attributes, but ...
Thomas Gajda Asbjørnhus's user avatar
1 vote
1 answer
242 views

Get Current Selected Variation ID and Name in WooCommerce

I have a problem and no ideia how to resolve, basically I need the attribute name and value after the user selected. To be simple I trying to put the attributes name and ID in a PHP variable because I ...
Henrique R. Pohl's user avatar
1 vote
0 answers
75 views

Add a WYSIWYG editor to the Variation Description in Woocommerce

Is it possible to put a WYSIWYG editor for the Variation Description?
Karim Krimou's user avatar
3 votes
1 answer
237 views

Enable additional variation images in WooCommerce admin variable products

For the past one week, I have been trying to write custom PHP and jQuery code to upload additional variation images to each variation. I wrote some code, but it didn't work properly. With the code ...
softwarEng92's user avatar
0 votes
0 answers
56 views

what triggers thumbnail image on variation change - woocommerce

we have own functionality for variation selection which is alternative for this (from variable.php): wc_dropdown_variation_attribute_options( array( 'options' => $options, 'attribute' => $...
alench's user avatar
  • 69
1 vote
1 answer
46 views

Display a specific variation product attribute count before add to cart button in WooCommerce

There is a variable product with the attribute 'Color' and 3 values, white | black | red. I want to display the color count, which is '3' in this case, before add to cart button, I am using the ...
user14847965's user avatar
1 vote
0 answers
44 views

Incorrectly handle the quantity button for variable product in WooCommerce

I added quantity plus, minus button for both simple product and variable product. There correctly handled and correctly work for simple product, but did not correctly get the quantity for variable ...
Min Su Wai's user avatar
0 votes
0 answers
33 views

Woocommerce stock update via DB don't save variations in front

we have a script to update stock of products variations each 2 hours : // Database settings $db="*********"; $dbhost="*********"; $dbport=*********; $dbuser="*********"; $...
Remz Path's user avatar
1 vote
2 answers
174 views

Change input quantity step value based on selected variation weight in WooCommerce

I have a variable product on WooCommerce with 2 variations The variations are based on weight. One of them is 0.5 kg and the other one is 1 kg. So I would like to change default quantify selector ...
Mohsen's user avatar
  • 296
2 votes
1 answer
34 views

Move variable product short description under attribute dropdows in WooCommerce

Is there any way I could set or put a product short description under/below the variation but above add to cart button? "The Add to Cart Block is Wrapped up with the Variable selections" can ...
I am Dan's user avatar
2 votes
1 answer
527 views

Display a custom field for the selected variation in WooCommerce variable product

I'm using Woocommerce Min/Max Quantities and have set both the "Min" quantity and the "Group of" quantity for a lot of variations. I need to display these on the front end so that ...
AbandonedHope's user avatar
3 votes
1 answer
182 views

Show the saving amount for on sale products in WooCommerce single product pages

I'm using the following code to display the percent discount for simple and variable products, which works fine: add_action( 'woocommerce_before_shop_loop_item_title', '...
user21540512's user avatar
1 vote
2 answers
279 views

Add a text prefix to variation price in WooCommerce variable product pages

Using the WordPress Astra theme, I want to add a text after a <div> that has woocommerce-variation-price as class attribute, where the price of WooCommerce product variations is displayed I ...
GESAN's user avatar
  • 9
0 votes
0 answers
155 views

How To Get Variations Product From Amazon seller-central API

I am integrating Amazon for a store. In Amazon, every product has a default variation, but I couldn't find it in Amazon's documentation, has anyone experienced this process? I read this document but i ...
Danial Pato's user avatar
1 vote
1 answer
457 views

Get Add To cart URL of the first variation of a variable product in WooCommerce

I've been trying to find a way of "quick_add_to_cart" the first variation of any variable product in a product loop. Right now, the URL dynamically redirects to the product single page, ...
Christoffer Forstén's user avatar
-3 votes
1 answer
50 views

how to import variable product in woocommerce without using pro plugins

Normal import does not import variation in variable product A free plugin which import variable product OR An alternative solution such as a Code that allow import Variable product properly I Need a ...
VIVEK G's user avatar
1 vote
1 answer
167 views

How to include WooCommerce selected product variation details in a custom message

I added a button "Order on WhatsApp" in WooCommerce product page, and when clicked it redirects to WhatsApp with prefilled message like "I want to buy: product name and product URL"...
chirag's user avatar
  • 75

1
2 3 4 5
10