public function orders() { $this->parse_index_args(func_get_args()); if ($this->order_id) { $this->order($this->order_id); return; } $table = WPSC_Orders_Table::get_instance(); $table->offset = ($this->current_page - 1) * $table->per_page; $table->status = $this->current_status; $table->fetch_items(); $this->total_pages = ceil($table->total_items / $table->per_page); $this->total_items = $table->total_items; $this->count_items = count($table->items); $this->fetch_status_filters(); $this->view = 'customer-account-index'; }
function wpsc_get_customer_orders_list() { if (_wpsc_get_current_controller_name() != 'customer-account' || _wpsc_get_current_controller_slug() != 'orders') { return ''; } $table = WPSC_Orders_Table::get_instance(); ob_start(); $table->display(); return ob_get_clean(); }