id( 'customer-orders-preview' ) ->with( [ 'allLink' => add_query_arg( [ 'tab' => $this->getTab(), 'model' => 'order', 'action' => 'index', ] ), 'isCustomer' => User::current()->isCustomer(), 'query' => apply_filters( 'surecart/dashboard/order_list/query', [ 'customer_ids' => array_values( User::current()->customerIds() ), 'status' => [ 'paid', 'processing', 'payment_failed', 'canceled', 'void' ], 'page' => 1, 'per_page' => 5, ] ), ] )->render( ( $attributes['title'] ?? __( 'Order History', 'surecart' ) ) ? "" . ( $attributes['title'] ?? __( 'Order History', 'surecart' ) ) . '' : '' ) ); } /** * Index. */ public function index() { if ( ! is_user_logged_in() ) { return; } ob_start(); ?> id( 'customer-orders-index' ) ->with( [ 'heading' => __( 'Order History', 'surecart' ), 'isCustomer' => User::current()->isCustomer(), 'query' => apply_filters( 'surecart/dashboard/order_list/query', [ 'customer_ids' => array_values( User::current()->customerIds() ), 'status' => [ 'paid', 'processing', 'payment_failed', 'canceled', 'void' ], 'page' => 1, 'per_page' => 10, ] ), ] )->render() ); ?>
id( 'sc-customer-fulfillments' ) ->with( [ 'orderId' => $this->getId(), 'showPreShipmentNotice' => (bool) $show_pre_shipment_notice, ] )->render() ); ?>
id( 'sc-customer-order' ) ->with( [ 'orderId' => $this->getId(), 'customerIds' => array_values( (array) User::current()->customerIds() ), ] )->render() ); ?>