Home / Forums / WoodMart support forum / WoodMart 8.5.0: attribute product labels not all rendered
Home › Forums › WoodMart support forum › WoodMart 8.5.0: attribute product labels not all rendered
WoodMart 8.5.0: attribute product labels not all rendered
- This topic has 7 replies, 2 voices, and was last updated 3 weeks, 2 days ago by
Serg Sokhatskyi.
-
AuthorPosts
-
May 31, 2026 at 9:31 pm #720078
joelmellinParticipantHello WoodMart support,
After updating to WoodMart 8.5.0, I noticed that one of my product attribute labels is no longer displayed on product pages/product cards, even though it is correctly enabled and assigned.
The issue concerns product attribute labels shown as product badges.
Environment:
* WoodMart parent theme: 8.5.0
* WoodMart child theme active
* WooCommerce product attributes are used for product labels
* “Show attribute label on products” is enabled for both affected attributes
* Product labels are enabled under Theme Settings → Shop → Product labelsExample product:
* Product ID: 25582
* SKU: 11805
* Product: Pistachios
* Attributepa_ursprung: Uzbekistan
* Attributepa_minst-hallbar-till: 2027-05Both attributes are correctly assigned to the product and both are visible WooCommerce product attributes.
When I tested this directly in PHP,
woodmart_get_product_attributes_label()returned both attribute labels correctly:`html
<span class=”attribute-label label-term-uzbekistan label-attribute-pa_ursprung”>Uzbekistan</span>
<span class=”attribute-label label-term-2027-05 label-attribute-pa_minst-hallbar-till”>2027-05</span>
`However, when
woodmart_product_label()renders the final product label HTML, only one of the attribute labels is output:`html
<span class=”attribute-label product-label wd-shape-round-sm label-term-2027-05 label-attribute-pa_minst-hallbar-till”>2027-05</span>
`The
pa_ursprunglabel is omitted, even though WoodMart’s own helper function has already found and generated it.The relevant functions are located here:
`text
wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php
`Specifically:
*
woodmart_product_label()around lines 1813–1849
*woodmart_get_product_attributes_label()around lines 2008–2048As a temporary workaround, I added a small MU plugin using the
woodmart_product_label_outputfilter. The workaround callswoodmart_get_product_attributes_label()again and appends any missing enabled attribute labels that are not already present in the$outputarray.The workaround successfully restores both labels:
`html
<span class=”attribute-label product-label wd-shape-round-sm label-term-2027-05 label-attribute-pa_minst-hallbar-till”>2027-05</span>
<span class=”attribute-label product-label wd-shape-round-sm label-term-uzbekistan label-attribute-pa_ursprung”>Uzbekistan</span>
`It seems that WoodMart 8.5.0 correctly detects all enabled attribute labels through
woodmart_get_product_attributes_label(), but the final label rendering throughwoodmart_product_label()only outputs one of them.Could you please investigate this and fix it in an upcoming WoodMart update, so that all enabled attribute product labels are rendered as expected?
Thank you.
June 1, 2026 at 10:05 am #720102Hi there,
Thanks for reaching out.We checked the example product you mentioned (Pistachios, ID 25582) and both attribute labels are rendered on our side. Screenshot: https://gyazo.com/618ac9cc5f1bb6b6950df4755e3b4e5a
Could you please clarify:
– Where exactly the label is missing for you (single product page, product grid/card, specific archive)?
– A front-end URL where we can see the issue.Once we can reproduce it on a specific page, we’ll investigate further.
Kind regards,
XTemos StudioJune 1, 2026 at 10:21 am #720105
joelmellinParticipantHi,
The reason both labels are visible on your side now is that I have, as I wrote, currently applied a temporary MU plugin workaround on the live site. That workaround uses the
woodmart_product_label_outputfilter to add back the missing enabled attribute labels.So the current front-end view is not the original broken state anymore.
Before applying the workaround, the issue was as follows:
Example product:
* Product ID: 25582
* SKU: 11805
* Product: Pistachios
* URL: https://mellins.nu/produkter/notter-och-fron/notter/pistagenotter-pistasch-naturella-utan-skal-obesprutade/Both attributes were correctly assigned to the product:
*
pa_ursprung: Uzbekistan
*pa_minst-hallbar-till: 2027-05Both attributes also had “Show attribute label on products” enabled.
When testing directly in PHP, WoodMart’s helper function returned both labels correctly:
`php
woodmart_get_product_attributes_label()
`returned:
`html
<span class=”attribute-label label-term-uzbekistan label-attribute-pa_ursprung”>Uzbekistan</span>
<span class=”attribute-label label-term-2027-05 label-attribute-pa_minst-hallbar-till”>2027-05</span>
`However, the final output from:
`php
woodmart_product_label()
`only rendered this label:
`html
<span class=”attribute-label product-label wd-shape-round-sm label-term-2027-05 label-attribute-pa_minst-hallbar-till”>2027-05</span>
`The
pa_ursprunglabel was missing from the final rendered label output, even thoughwoodmart_get_product_attributes_label()had already found it.The relevant functions are in:
`text
wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php
`Specifically:
*
woodmart_product_label()around lines 1813–1849
*woodmart_get_product_attributes_label()around lines 2008–2048The temporary workaround I added is located here:
`text
wp-content/mu-plugins/mellins-woodmart-attribute-labels.php
`It simply calls
woodmart_get_product_attributes_label()again through thewoodmart_product_label_outputfilter and appends any missing enabled attribute labels that are not already present in$output.After applying this workaround, both labels are rendered again, which is what you are seeing now.
Could you please investigate why WoodMart 8.5.0, without this workaround, detects both enabled attribute labels through
woodmart_get_product_attributes_label()but only outputs one of them throughwoodmart_product_label()?Kind regards
June 1, 2026 at 10:38 am #720112Please, remove the fix temporarily so we can investigate the problem on your website.
June 1, 2026 at 10:45 am #720116
joelmellinParticipantHi,
I have now removed the temporary MU plugin workaround and cleared the cache.
Please note that the front-end may still show cached HTML for a while, but the issue is now again reproducible at PHP level on the site.
I verified that the workaround is no longer active:
`text
wp plugin list –status=must-use
`The MU plugin
mellins-woodmart-attribute-labels.phpis no longer present.I also checked the callbacks on the
woodmart_product_label_outputfilter. The only remaining callback is WoodMart’s own callback:`text
XTS\Modules\Custom_Labels\Frontend::render_labels
/home/mellins/domains/mellins.nu/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/custom-labels/class-frontend.php:49-94
`Then I tested the output of
woodmart_product_label()directly for the product:* Product ID: 25582
* SKU: 11805
* URL: https://mellins.nu/produkter/notter-och-fron/notter/pistagenotter-pistasch-naturella-utan-skal-obesprutade/The result is that the origin attribute label is missing from the final WoodMart label output:
`text
Har Ursprung/Uzbekistan? NEJ
Har Minst hållbar till? JA
`The generated output only contains the
pa_minst-hallbar-tilllabel, while thepa_ursprunglabel is not rendered.This means the issue is now reproducible without my workaround. The product has both attributes assigned, and both attributes are enabled as product labels, but WoodMart’s final
woodmart_product_label()output only renders one of them.Please investigate why WoodMart’s final product label rendering omits
pa_ursprung, even though the attribute exists on the product and is enabled as a product label.Kind regards
June 1, 2026 at 2:08 pm #720142Hello,
You can fix this by applying patch #720140. Please follow these steps:
1. Go to Dashboard > WoodMart > Patcher
2. Find the corresponding patch in the list
3. Click the Apply buttonPlease let us know if this resolves the issue.
Best regards
June 1, 2026 at 6:05 pm #720208
joelmellinParticipantHi,
Thank you. I have applied the patch and tested it via SSH.
The temporary MU plugin workaround is no longer active. The only remaining callback on
woodmart_product_label_outputis now WoodMart’s own callback:`text
XTS\Modules\Custom_Labels\Frontend::render_labels
`I tested the affected product again:
* Product ID: 25582
* SKU: 11805The final
woodmart_product_label()output now contains both attribute labels:`text
pa_ursprung: yes
pa_minst-hallbar-till: yes
`I also tested 30 published products that have both attributes assigned, and all of them returned both labels correctly.
A frontend cache-bypass test also confirms that both labels are now rendered in the product labels HTML.
So the patch appears to solve the issue.
Could you please confirm whether this fix will be included in the next official WoodMart update? I want to make sure the fix will not be overwritten by a future theme update.
Kind regards
June 2, 2026 at 9:27 am #720256Sure, we will include this fix in our next theme update. Thank you for the feedback.
Topic closed.
-
AuthorPosts
The topic ‘WoodMart 8.5.0: attribute product labels not all rendered’ is closed to new replies.
- You must be logged in to create new topics. Login / Register