• Resolved JaySkay

    (@tibia123)


    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)
  • Plugin Support alina98

    (@alina98)

    Hi @tibia123 ,

    Thanks for reaching out!

    Please let me check with the dev and I will feed you back as soon as possible.

    Regards,
    Alina

    Plugin Support mialewp

    (@mialewp)

    Hi @tibia123,

    Good day!

    Thanks for your patience.

    Please add the following CSS to snippet code and test again.

    add_filter(‘woocommerce_email_order_item_quantity’, function($qty_display, $item) { if ($qty_display > 1) { return ‘<strong style=”color: red!important; font-size: 20px !important;”>’ . esc_html($qty_display) . ‘</strong>’; } return $qty_display; }, 10, 2);

    Hope that works.

    Best regards,

    Mia






    Plugin Support mialewp

    (@mialewp)

    Hello @tibia123,

    Good day!

    Does it work, please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.