Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function woo_order_history( $atts ) {
- extract( shortcode_atts( array(
- 'order_count' => -1
- ), $atts ) );
- ob_start();
- $customer_orders = wc_get_orders( apply_filters( 'woocommerce_my_account_my_orders_query', array(
- 'customer' => get_current_user_id(),
- 'page' => $current_page,
- 'paginate' => true,
- ) ) );
- wc_get_template(
- 'myaccount/orders.php',
- array(
- 'current_page' => absint( $current_page ),
- 'customer_orders' => $customer_orders,
- 'has_orders' => 0 < $customer_orders->total,
- )
- );
- return ob_get_clean();
- }
- add_shortcode('woocommerce_history', 'woo_order_history');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement