Forum Replies Created
-
AuthorPosts
-
aurelien.arthapignetParticipant
Here is the license for expiry dates : ****-********-********-********
aurelien.arthapignetParticipantHi
Can’t find the dev version on my account.
We got new issue: the script doesn’t work on some emails. And for the ones that doesn’t work, the meta shown right now are 2, instead of 1, both showing the same value. E.g.:
wcxd_expiry_date: May 15, 2019
Expiry Date: May 15, 2019Here’s the function we’re using right now:
add_filter( ‘woocommerce_order_item_get_formatted_meta_data’, ‘unset_specific_order_item_meta_data’, 20, 2);
function unset_specific_order_item_meta_data($formatted_meta, $item){
// Only on emails notifications
if( is_admin() )
return $formatted_meta;foreach( $formatted_meta as $key => $meta ){
if( in_array( $meta->key, array(‘wcxd_expiry_date’,’_wcxd_expiry_date’) ) )
unset($formatted_meta[$key]);
}
return $formatted_meta;
}February 23, 2019 at 8:14 am in reply to: Hiding Expiry dates to customer cart but Not to admin #4904aurelien.arthapignetParticipantThank you it worked however wcxd_expiry_date suddenly popped up on clients emails, here is the full code to hide both expiry and wcxd:
add_filter( ‘woocommerce_order_item_get_formatted_meta_data’, ‘unset_specific_order_item_meta_data’, 20, 2);
function unset_specific_order_item_meta_data($formatted_meta, $item){
// Only on emails notifications
if( is_admin()/* || is_wc_endpoint_url() */)
return $formatted_meta;foreach( $formatted_meta as $key => $meta ){
if( in_array( $meta->key, array(‘wcxd_expiry_date’,’_wcxd_expiry_date’) ) )
unset($formatted_meta[$key]);
}
return $formatted_meta;
}February 20, 2019 at 9:16 am in reply to: Hiding Expiry dates to customer cart but Not to admin #4895aurelien.arthapignetParticipantHi,
We have the same issue, we disable display of expiry date but we still have it on customer email.
I’ve tried this, but no luck:
add_filter( ‘woocommerce_order_item_get_formatted_meta_data’, ‘unset_specific_order_item_meta_data’, 10, 2);
function unset_specific_order_item_meta_data($formatted_meta, $item){
// Only on emails notifications
if( is_admin() || is_wc_endpoint_url() )
return $formatted_meta;foreach( $formatted_meta as $key => $meta ){
if( in_array( $meta->key, array(‘_wcxd_expiry_date’) ) )
unset($formatted_meta[$key]);
}
return $formatted_meta;
}Can you help?
Thanks.
-
AuthorPosts