Option for number of orders shown on view order page.

This commit is contained in:
Mike Jolley 2013-03-11 16:12:29 +00:00
parent df3b84845b
commit 256a38b5d8
2 changed files with 7 additions and 1 deletions

View File

@ -36,12 +36,16 @@ class WC_Shortcode_View_Order {
if ( ! is_user_logged_in() ) return;
extract( shortcode_atts( array(
'order_count' => 10
), $atts ) );
$user_id = get_current_user_id();
$order_id = ( isset( $_GET['order'] ) ) ? $_GET['order'] : 0;
$order = new WC_Order( $order_id );
if ( $order_id == 0 ) {
woocommerce_get_template('myaccount/my-orders.php', array( 'order_count' => 10 ));
woocommerce_get_template( 'myaccount/my-orders.php', array( 'order_count' => 'all' == $order_count ? -1 : $order_count ) );
return;
}

View File

@ -165,6 +165,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== Changelog ==
* Tweak - Like my account, added order_count attribute to view order shortcode.
= 2.0.3 - 11/03/2013 =
* Feature - Added products by attribute shortcode, e.g. [product_attribute attribute="color" filter="blue"]
* Tweak - Made coupon label more clear.