I put product status and other info in short description field on wp all import for all products like this:
URL: <a href="https://www.msi.com/Graphics-card/GeForce-GTX-1650-GAMING-4G/Specification" target="_blank" rel="noopener noreferrer">Производител линк</a>
<i class="fa fa-check" aria-hidden="true"></i> Наличен <i class="fa fa-truck" aria-hidden="true"></i> Доставка 1-3 дни
I want if product category is Videocards to change product status and icon to "call" insted of "avaliable" like this:
URL: <a href="https://www.msi.com/Graphics-card/GeForce-GTX-1650-GAMING-4G/Specification" target="_blank" rel="noopener noreferrer">Производител линк</a>
<i class="fa fa-volume-control-phone" aria-hidden="true"></i> Обадете се <i class="fa fa-truck" aria-hidden="true"></i> Доставка 1-3 дни
Any way to do this with custom function in wp all import or in function.php file of my active child theme?
2
Answers
The above code doesn't work for me, so I had to modify it, and here's a working code. Thanks to Hamid Reza Yazdani for the guidance.
You can use the following code:
Code goes in the
functions.php
file of your active theme/child theme. Tested and works.