I would like to customize the description output in the checkout for woocommerrce. It works fine, but I'm stuggeling how to deal with the extra's. I'd like only the word "extra" to be included if extra's are present. This is the regular behaviour if I don;'t change the description.
It should be able to work if you only add the placeholder %service_extras% without the word Extras. This placeholder needs to be added in the MetaData and Description option which will appear when you enable the WooCoomerce as the payment method. So, the placeholder should be able to read if there are any extras, if there isn't, then it will not render information.
Hi,
I would like to customize the description output in the checkout for woocommerrce. It works fine, but I'm stuggeling how to deal with the extra's. I'd like only the word "extra" to be included if extra's are present. This is the regular behaviour if I don;'t change the description.
This is my code:
<div class="flex--col">
<span><strong>Datum:</strong> %appointment_date%</span>
<span><strong>Tijd:</strong> %appointment_start_time% tot %appointment_end_time%</span>
<span><strong>Boeking:</strong> %service_name%</span>
<span><strong>Extra:</strong> %service_extras%</span>
</div>
How can I create a conditional structure in the last span?
Hello Wouter,
Thanks for reaching out to us.
It should be able to work if you only add the placeholder %service_extras% without the word Extras. This placeholder needs to be added in the MetaData and Description option which will appear when you enable the WooCoomerce as the payment method. So, the placeholder should be able to read if there are any extras, if there isn't, then it will not render information.
Please, let us know if it works.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables