public static function get_instance() { if (empty(self::$instance)) { self::$instance = new WPSC_Digital_Contents_Table(); } return self::$instance; }
public function digital_content() { require_once WPSC_TE_V2_CLASSES_PATH . '/digital-contents-table.php'; $table = WPSC_Digital_Contents_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->view = 'customer-account-digital-content'; }
function wpsc_get_customer_account_digital_contents() { $table = WPSC_Digital_Contents_Table::get_instance(); ob_start(); $table->display(); return ob_get_clean(); }