• Resolved seoidau

    (@seoidau)


    Thanks for your product. ??

    Having my first actual customer order since implementing this plugin, I have noticed unnecessary additional HTML that causes a line break in customer invoices.

    Your plugin adds this below the purchased product:

    <div>Pre-Order product</div>
    <br></br>
    <small></small>

    Also while we’re here, it is possible to add a note in the basket page, the same way WooCommerce itself does with backorder products?

    <p class="backorder_notification">Available on backorder</p>

    Thank-you very much in advance!

    • This topic was modified 7 years, 8 months ago by seoidau.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi @seoidau,

    Have you updated the plugin? In previous versions, there was a <br> tag that is no longer available.
    Can you check, please?

    Best regards,
    YIThemes

    Thread Starter seoidau

    (@seoidau)

    Hi. I am using the current version, 1.1.0.

    Plugin Author YITHEMES

    (@yithemes)

    Hi @seoidau,

    It can depend on any other plugin you have activated on your site. Pre-Order 1.1.0 doesn’t print <br> tags, and it has never printed <small> tags. It could also depend on the WooCommerce version you are using. If you haven’t already, we suggest updating it to the latest version.

    About your suggestion, are you referring to add a “Pre-Order product” label to the cart page to highlight the products that are Pre-Order? If so, we will add this feature soon.

    Best regards,
    YIThemes

    Thread Starter seoidau

    (@seoidau)

    All plugins I am using are current.

    In this particular store I have both backorder (WooCommerce function) and pre-order (your plugin) products active. What I have noticed is this:

    WooCommerce backorder:

    <br></br>
    <small>Backordered: 1</small>
    </td>

    YITH Pre-Order:

    <div>Pre-Order product</div>
    <br></br>
    <small></small>
    </td>

    Is perhaps WooCommerce putting the br and small tags in because this product requires a note? Is your plugin able to leverage this for consistency and insert ‘Pre-Order product’ in the small tags if they are going to be there anyway?

    As for my suggestion, yes. Apart from the product button changing to say pre-order, there is no further reminder of this until in emails. Just like with backorder products, further advice/reminders about this transaction type would assist customers.

    Plugin Author YITHEMES

    (@yithemes)

    Hi @seoidau,

    It seems that these tags (<br> and <small>) are generated by WooCommerce in the template email-order-items.php. Please take a look.

    if ( ! empty( $item_meta->meta ) ) {
         echo '<br/><small>' . nl2br( $item_meta->display( true, true, '_', "\n" ) ) . '</small>';
    }

    YITH Pre-Order for WooCommerce uses the action ‘woocommerce_order_item_meta_start’ in order to display ‘Pre-Order product’ below the item name. This is all the plugin does. It doesn’t print any other tags or elements.
    I hope this clears up any doubts.

    Cheers,
    YIThemes

    Thread Starter seoidau

    (@seoidau)

    Okay, thanks for clarifying. So nothing can be done to fix products marked as pre-order items from activating the unnecessary code?

    Plugin Author YITHEMES

    (@yithemes)

    Hi @seoidau,

    It seems that from the next WooCommerce release you won’t have this problem anymore, because the developers have made some changes in the email-order-items.php file.
    Stay tuned and don’t miss out the new WooCommerce version.

    Best regards,
    YIThemes

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Additional HTML in order email’ is closed to new replies.