First order discount for guest customers checking Woocommerce orders billing email
问题 By checking the GUEST customer's email address against processing and completed orders, I want to give the GUEST a "first order discount" if the email has no orders. It would be nice if this could happen as the guest types in their email. I think I've managed to make the discount code and now I am asking for help on merging these two codes, making it all work. Here's the discount code: add_action( 'woocommerce_cart_calculate_fees', 'first_time_order_discount', 10, 1 ); function first_time