Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bb_orders_with_status() {
- $orders = wc_get_orders( array('numberposts' => -1) );
- foreach( $orders as $order ) {
- echo $order->get_id() . ' has status ' . $order->get_status() . '<br>';
- } }
- add_shortcode('orders_and_statuses', 'bb_orders_with_status');
Add Comment
Please, Sign In to add comment