Get sanitized version of variation product name rather than slug
-
This is not a proper “issue”. This is more an enquiry about functionalities.
I have a product with 2 variations that i choose via a drop down menu.
When i add those variations on the backend i specify a name (eg. Bike 1 / Bike 2) in a “sanitized” way.
Using the get_product_variations and or get_variation_attributes functions i am able to extract the name of the variation only in a slug form (eg. bike-1 / bike-2).
Where exactly is the name i put in manually stored so that i can pick it as it is?PS: For now i am using a workaround which is working perfectly but it’s non-ideal to say the least.
Basically i am adding the same name on the description field of the variation and then extracting it from the variable_attribute key of the array resulting from get_poroduct_variations…and properly sanitizing it removing the <p> that is added automatically.Thanks.
- The topic ‘Get sanitized version of variation product name rather than slug’ is closed to new replies.