Custom change design if quantity > 1
-
Hey there,
I would like to change the design of the design of content inside the woo table in the “New order” email.
I would like the quanity vale or the entire row get bold and bigger if the quantity is greater than 1.
ChatGPT gave me suggestions like those but it doesn’t work.
Any idea?Step 1: Custom CSS
Add the following CSS to the YayMail Custom CSS section:
.yaymail_item_quantity_content.highlight {
font-weight: bold !important;
font-size: 20px !important; /* Adjust as needed */
color: red !important; /* Optional: change color */
}Step 2: Modify the PHP Snippet
Use the following PHP code to apply the
highlight
class to the quantity:add_filter('yaymail_item_quantity_content', function($quantity, $item) {
if ($quantity > 1) {
return '<span class="yaymail_item_quantity_content highlight">' . $quantity . '</span>';
}
return $quantity;
}, 10, 2);It doesnt work and I can’t see the class in the code of the test emails. So there is something wrong with the php cnippet. Any idea?
HELP!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.