I am using the following function to add variables to a plugin:
function fuekb_register_variable_replacements( $var, $email_data, $fue_email, $queue_item ) {
$variables['testvar'] = get_the_title($email_data['product_id']);
$var->register( $variables );
}
add_action( 'fue_before_variable_replacements', 'fuekb_register_variable_replacements', 10, 4);
The variable testvar
is getting registered using this function. This is working fine for orders with single products, but when there are more than 1 products, it lists only the 1st product. How to create a foreach loop inside this function for all products in the order?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745353413a4623973.html
评论列表(0条)