Title: Request for a filter
Last modified: June 11, 2022

---

# Request for a filter

 *  Resolved [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [4 years ago](https://wordpress.org/support/topic/request-for-a-filter/)
 * 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)

 *  [mivtt](https://wordpress.org/support/users/mivtt/)
 * (@mivtt)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/request-for-a-filter/#post-15734528)
 * Hi,
 * We will add this filter you inquired about in the next updates, please kindly
   wait.
 * Best regards
 *  Thread Starter [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/request-for-a-filter/#post-15734743)
 * 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.

 * ![](https://ps.w.org/woo-abandoned-cart-recovery/assets/icon-256x256.gif?rev=
   3081786)
 * [Abandoned Cart Recovery for WooCommerce](https://wordpress.org/plugins/woo-abandoned-cart-recovery/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-abandoned-cart-recovery/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-abandoned-cart-recovery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-abandoned-cart-recovery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-abandoned-cart-recovery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [alx359](https://wordpress.org/support/users/alx359/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/request-for-a-filter/#post-15734743)
 * Status: resolved