ASTRA_Ext_WooCommerce_Markup::astra_addon_woo_account_orders( int $current_page )
My Account > Orders WooCommerce template.
Description
Parameters
- $current_page
-
(int) (Required) Current page number.
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function astra_addon_woo_account_orders( $current_page ) {
$current_page = empty( $current_page ) ? 1 : absint( $current_page );
$customer_orders = wc_get_orders(
apply_filters(
'woocommerce_my_account_my_orders_query',
array(
'customer' => get_current_user_id(),
'page' => $current_page,
'paginate' => true,
)
)
);
astra_addon_get_template(
'woocommerce/templates/orders.php',
array(
'current_page' => absint( $current_page ),
'customer_orders' => $customer_orders,
'has_orders' => 0 < $customer_orders->total,
)
);
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |