I am attempting to adapt How to get coupons from email restrictions with efficiency in WooCommerce. I want to filter only for the customer email, without the voucher discount type. Currently my shop uses multiple discount types (free product, fixed cart discount etc.)
I tried to delete these line but fail to produce the result I want.
INNER JOIN
{$wpdb->prefix}postmeta pm ON p.ID = pm.post_id
AND pm.meta_key = 'discount_type'
AND pm.meta_value = '%s'
How can I filter on only email whilst disregarding discount type?