1. Home
  2. Abandoned Cart for WooCommerce – Lite
  3. Hooks & Filter documentation
  4. Hooks for Reminder Emails

Hooks for Reminder Emails

How can I hide/edit the Quantity column in the reminder emails?

Hook
wcal_reminder_email_qty_heade

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_qty_header', 'change_qty_header', 10, 1 );

function change_qty_header( $qty_header ) {
$qty_header = 'Number of Items';
return $qty_header;
}

Hook
wcal_reminder_email_qty_value

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_qty_value', 'change_qty_value', 10, 1 );

function change_qty_value( $quantity_total ) {
$quantity_total = ''; // No qty will be displayed.
return $quantity_total ;
}

How can I hide/edit the Price column in reminder emails?

Hook
wcal_reminder_email_price_header

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function change_price_header( $price_header ) {
$price_header = 'Amount';
return $price_header;
}
add_filter( 'wcal_reminder_email_price_header', 'change_price_header', 10, 1 );

Hook
wcal_reminder_email_price_value

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function change_price_value( $item_subtotal) {
$item_subtotal = ''; // Hide the price.
return $item_subtotal;
}
add_filter( 'wcal_reminder_email_price_value', 'change_price_value', 10, 1 );

How can I edit Product name in reminder emails?

Hook
wcal_reminder_email_after_product_name

Used to edit the product name displayed in the Name column in the {{products.cart}} merge tag. This filter will be run for each product row in the cart table displayed in the reminder emails.

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_after_product_name', 'change_product_name', 10, 2 );
function change_product_name( $product_name, $v ) {
$product_id = $v->product_id;
$product_name = get_the_title( $product_id );
return $product_name;
}

How can I hide/edit Line Subtotal column in reminder emails?

Hook
wcal_reminder_email_line_subtotal_header

Used to edit the column name for the Line Subtotal column in the {{products.cart}} merge tag. This filter will be run for each product row in the cart table displayed in the reminder emails.

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_line_subtotal_header', 'change_subtotal_header', 10, 1 );
function change_subtotal_header( $line_subtotal_header ) {
$line_subtotal_header = 'Subtotal';
return $line_subtotal_header;
}

Hook
wcal_reminder_email_line_subtotal_value

Used to edit the column value for the Line Subtotal column in the {{products.cart}} merge tag. This filter will be run for each product row in the cart table displayed in the reminder emails.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_line_subtotal_value', 'change_subtotal_value', 10, 1 );
function change_subtotal_value( $item_total_display) {
$item_total_display = ''; // Hide the line subtotal.
return $item_total_display;
}

How can I hide/edit the Cart total title & value?

Hook
wcal_reminder_email_cart_total_title

Used to edit the Cart Total title in the {{products.cart}} merge tag:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_cart_total_title', 'change_total_title', 10, 1 );
function change_total_title( $cart_total_title) {
$cart_total_title = 'Total';
return $cart_total_title;
}

Hook
wcal_reminder_email_cart_total

Used to edit the cart total value in the {{products.cart}} merge tag.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_cart_total', 'change_cart_total', 10, 1 );
function change_cart_total( $cart_total) {
$cart_total = ''; // Hide the cart total.
return $cart_total;
}

Hook
wcal_email_sku

Used to edit the SKU of the products in the {{products.cart}} merge tag.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_email_sku', 'hide_sku', 10, 2 );
function hide_sku( $sku, $product_id ) {
	$sku = '';
	return $sku;
}

How can I send the reminder emails even if the cart total is zero?

Hook
wcal_check_cart_total

Send the abandoned cart reminder email if the cart total is 0:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function wcal_item_cart_total( $return_value, $cart_id) {
  return true;
}
add_filter( 'wcal_check_cart_total', 'wcal_item_cart_total', 10 , 2 );

How can I hide/edit the Product Image column in the reminder emails?

Hook
wcal_reminder_email_img_header

Used to edit the column name for the Product Image column in the {{products.cart}} merge tag.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_img_header', 'change_img_header', 10, 1 );
function change_img_header( $img_header ) {
$img_header = ''; // Will hide the column.
return $img_header;
}

strong>Hook
wcal_reminder_email_image_value

Used to edit the column value for the Product Image column in the {{products.cart}} merge tag. This filter will be run for each product row in the cart table displayed in the reminder emails.

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_image_value', 'change_img_value', 10, 1 );
function change_img_value( $img_col ) {
$img_col= ''; // Hide the column.
return $img_col;
}

How can I hide/edit the Product Name column in the reminder emails?

Hook
wcal_reminder_email_product_header

Used to edit the column name for the Product Name column in the {{products.cart}} merge tag.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_product_header', 'change_name_header', 10, 1 );
function change_name_header( $name_header ) {
$name_header = 'Your selection'; // Will hide the column.
return $name_header;
}

Hook
wcal_reminder_email_prod_value

Used to edit the column value for the Product Name column in the {{products.cart}} merge tag. This filter will be run for each product row in the cart table displayed in the reminder emails.

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
add_filter( 'wcal_reminder_email_prod_value', 'change_product_name', 10, 1 );
function change_product_name( $prod_col ) {
$prod_col= ''; // Hide the column.
return $prod_col;
}

Hook
wcal_cart_link_email_before_encoding

Allows the site admin to redirect users to custom pages instead of the WooCommerce Cart page.:

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function update_cart_link( $wc_link, $cart_id ) {
     ... add checks as needed...
     $wc_link = [custom link of your choice];
     return $wc_link;
}
add_filter( 'wcal_cart_link_email_before_encoding', 'update_cart_link', 10, 2 );

How can I add a custom style in {{products.cart}} merge tag table

Hook
wcal_add_table_style_email

Allows the site admin to add custom style attributes to the table added in {{products.cart}} merge tag

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function change_table_style( $table_custom_style ) {
     $table_custom_style .= 'background-color: #cde5ce;color: #000000'; // Note: always concat the style to ensure no previous data is lost.
     return $table_custom_style;
}
add_filter( 'wcal_add_table_style_email', 'change_table_style', 10, 1 );

How can I hide/show Taxes in reminder emails?

Hook
wcal_show_taxes

Allows site admin to choose whether taxes should be displayed in reminder emails

/**
* Add this code snippet in the "functions.php" file of your currently active theme.
*/
function hide_taxes( $display ) {
    $display = false;
    return $display;
}
add_filter( 'wcal_show_taxes', 'hide_taxes', 10, 1 );
Was this article helpful to you? Yes No

How can we help?