• Resolved alx359

    (@alx359)


    Hello,

    This is a request for a new hook, to support the same kind of scenario as in another plugin of yours. The requested hook (which you so kindly accepted in the Cart Recovery plugin) opens up the possibility to modify with new logic the implicit template of the tracking emails, which doesn’t seem possible to achieve otherwise.

    In import_csv.php ~line 2040, the envisaged woo_orders_tracking_table_htmlhook shall capture the buffer while being assigned to the $tracking_table variable and so allow some custom html modifications before performing the final template replacements and email dispatch. Namely:

    
    // alx359: allow modification of the tracking table presentation
    //$tracking_table = ob_get_clean();
    $tracking_table = apply_filters( 'woo_orders_tracking_table_html', ob_get_clean(), $order_id );
    $content        = str_replace( array(
    	'{order_id}',
    	'{billing_first_name}',
    	'{billing_last_name}',
    	'{tracking_table}'
    ), array(
    	$order_id,
    	$billing_first_name,
    	$billing_last_name,
    	$tracking_table
    ), $content );

    Thank you again for your consideration.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Request for a filter’ is closed to new replies.