• Resolved fxp869

    (@fxp869)


    When a customer make an order and goes to confirmation page the following msg appears below of the preorder product:
    “Pre-order product
    Availability date: January 1, 2024″

    I need to change the “Availability Date” text with “Shipping”
    Thanks in advance

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Alberto Ruggiero

    (@witcher83)

    Hello @fxp869

    please put this code in the functions.php file of your theme:

    add_filter( 'ywpo_order_item_release_date_label', 'my_ywpo_order_item_release_date_label' );
    function my_ywpo_order_item_release_date_label() {
    	return __( 'Shipping: ', 'yith-pre-order-for-woocommerce' );
    }
    Thread Starter fxp869

    (@fxp869)

    Thanks it works. actually I edit the code like following to have a full custom text:

    add_filter( 'ywpo_order_item_no_date_label_output', '__return_empty_string' );
    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 = '<div style="color: #9C27B0;" class="noreleasedatepreordermsg">Shipping within 2-3 weeks</div>';
    		}
    		else
    			$label = '<div style="color: #9C27B0;" class="withreleasedatepreordermsg">Shipping 1-2 weeks after its release date - </div>';
    		return __( $label, 'yith-pre-order-for-woocommerce' );
    	}
    }

    Is it possible to include the release date in this code too?
    Thank you in advanced

    • This reply was modified 11 months, 2 weeks ago by fxp869.
    • This reply was modified 11 months, 2 weeks ago by fxp869.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit text Availability date:’ is closed to new replies.