Merge pull request #7304 from bryceadams/patch-7301
Fix fatal error on /my-account/view-order/ endpoint
This commit is contained in:
commit
0749fe752d
|
@ -3,7 +3,7 @@
|
||||||
* Contains the query functions for WooCommerce which alter the front-end post queries and loops.
|
* Contains the query functions for WooCommerce which alter the front-end post queries and loops.
|
||||||
*
|
*
|
||||||
* @class WC_Query
|
* @class WC_Query
|
||||||
* @version 1.6.4
|
* @version 2.3.0
|
||||||
* @package WooCommerce/Classes
|
* @package WooCommerce/Classes
|
||||||
* @category Class
|
* @category Class
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
|
@ -113,7 +113,7 @@ class WC_Query {
|
||||||
break;
|
break;
|
||||||
case 'view-order' :
|
case 'view-order' :
|
||||||
$order = wc_get_order( $wp->query_vars['view-order'] );
|
$order = wc_get_order( $wp->query_vars['view-order'] );
|
||||||
$title = sprintf( __( 'Order %s', 'woocommerce' ), _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number() );
|
$title = ( $order ) ? sprintf( __( 'Order %s', 'woocommerce' ), _x( '#', 'hash before order number', 'woocommerce' ) . $order->get_order_number() ) : '';
|
||||||
break;
|
break;
|
||||||
case 'edit-account' :
|
case 'edit-account' :
|
||||||
$title = __( 'Edit Account Details', 'woocommerce' );
|
$title = __( 'Edit Account Details', 'woocommerce' );
|
||||||
|
|
Loading…
Reference in New Issue