Remove parts from variables in product order email

Question

Trying to remove parts from variables in product order email..

Already have this code which removes content from product title, but does not work for product options/variables.

/** Remove variation from title order */
function remove_variation_from_product_title_order( $title, $item, $is_visible ) {

    $_product = $item['data'];
    $replace = array( ', warm', 'warm', ', koud', 'koud');
    $title = str_replace( $replace, '', $title);

    return apply_filters( 'woocommerce_product_variation_title', $title );

}
0
seb_dev 3 months 0 Answers 7 views 0

Leave an answer