• Resolved sarahjsouris

    (@sarahjsouris)


    Hello,

    Thanks in advance for your help.

    We have started receiving order confirmation emails (which are also going to the customers), which have a large and confusing label under each pre-order product.

    They used to just say ‘pre-order product’, now they say

    Product title
    Pre-order product
    Availability
    N/A

    https://snipboard.io/urzhjG.jpg

    Is there some way to remove the ‘Availability N/A’ from the order emails if there is no date selected?

    Thanks,
    Sarah

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Armando

    (@geckod22)

    Hi there,
    add this code to your child theme functions.php file

    add_filter( 'ywpo_order_item_no_date_label_output', '__return_empty_string' );

    Regards

    Thread Starter sarahjsouris

    (@sarahjsouris)

    Hi @geckod22 Armando,

    Thanks so much for your reply. I added that code snippet to my functions.php but it resulted in a critical error on the website (it crashed).

    Also, there’s an error message in the functions.php file when I post your code – ‘syntax error – unexpected $EOF’

    Thanks in advance for your help.

    Kindly,
    Sarah

    Plugin Support Armando

    (@geckod22)

    Hi,
    I think the problem is when you copy and paste; try to copy only the code text.

    Thread Starter sarahjsouris

    (@sarahjsouris)

    Thanks, Armando @geckod22

    You were right. I don’t know what I did last time, but copying the code didn’t break the site this time.

    I am still getting these line breaks and details in the order confirmation. See here – https://snipboard.io/vqBK3H.jpg

    Is there some tweak that could fix it?

    The N/A seems to be removed but not the availability date.

    I really appreciate any help you can provide.
    Sarah

    Plugin Support Armando

    (@geckod22)

    Hi there,
    please add also this code

    if ( ! function_exists( 'ywpo_order_item_release_date_label_custom' ) ) {
    	add_filter( 'ywpo_order_item_release_date_label', 'ywpo_order_item_release_date_label_custom', 10, 3 );
    	function ywpo_order_item_release_date_label_custom( $label, $item, $order ) {
    
    		if ( empty( $item['ywpo_item_for_sale_date'] ) ) {
    			$label = '';
    		}
    		return $label;
    	}
    }
    Thread Starter sarahjsouris

    (@sarahjsouris)

    Thanks a lot, Armando @geckod22
    It works perfectly!
    Have a great weekend.
    Thanks again.
    Sarah

    Thank God I can finally remove this…

    And how to delete the “New pre-order received” emails which are totally useless? It would have been good to consult users before adding these features, and especially to give the possibility of disabling them (easily). ??

    @goudie35
    It is possible to disable the email notifications from your site’s admin panel. Disable the checkbox in WooCommerce->Settings->Emails->YITH Pre-Order: New pre-order

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to remove Availability date: N/A on order confirmation’ is closed to new replies.