• Resolved alx359

    (@alx359)


    Hello,

    Need to modify the email send by the plugin in a way that seems not possible by just tweaking the declarative templates. To achieve that, a new hook wacv_cart_item is envisaged in send-email-cron.php at ~line 318, i.e. function create_email_content(), just before the template substitution happens. Namely:

    $item['quantity'] = __( 'Quantity:', 'woo-abandoned-cart-recovery' ) . ' ' . $item['quantity'];
    
    // alx359: modify presentation of order items 
    $item = apply_filters( 'wacv_cart_item', $item );
    
    $search = array(
    	'{wacv_image_product}',
    	'{wacv_name_&_qty_product}',
    	'{wacv_short_description}',
    	'{product_amount}',
    	'{product_name}',
    	'{product_quantity}'
    );
    $out .= str_replace( $search, $item, $match[1] );
    

    Similarly, function render_email_content_for_order_reminder() has almost the same substitution logic, so it seems consistent to add that same hook at ~line 690.

    The reason for the need of such hook follows from the zero-priced hosting products we use for presentation, which themselves contain other priced products as components. I need to filter out the price and qty of the former as manner to avoid unnecessary confusion and cluttering. I do that already in the cart and anywhere else in the shop, but now also need to do it in the reminder emails send by the plugin.

    Thank you for your consideration.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    We will add this filter you inquired about in the next updates, please kindly wait.

    Best regards

    Thread Starter alx359

    (@alx359)

    Thank you!

    Said filter is conductive to other useful usages as well. In our scenario, it allows inserting logic to swap the generic thumbnails coming from the components’ gallery, with specific ones from the host product. That gives the reminder emails a cart look consistent with the rest of the shop.

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

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