I would like to List all orders that contain products that had discounts on them, so I can generate a report based on only the orders that have discounts on them and get the [ order number, order date, order status, order total, user name, email and phone ]
of every order that have product with discount
something like
if (order_had_product_with_discount) {
get the [ order number, order date, order status, order total, user name, email and phone ] of this order
}
It's not valid code but I need to know where to start.
' .'Order Status: '. $order->status . '
' . 'Order Creation Date: ' ; } }` but there is a problem it gets the discounts made by discount coupon i want it to get discounts that is made through products in wordpress not coupons – mohamed adel Apr 07 '19 at 16:15