id( 'customer-licenses-preview' ) ->with( [ 'isCustomer' => User::current()->isCustomer(), 'heading' => $attributes['title'] ?? __( 'Licenses', 'surecart' ), 'query' => [ 'customer_ids' => array_values( User::current()->customerIds() ), 'page' => 1, 'per_page' => 5, ], 'allLink' => add_query_arg( [ 'tab' => $this->getTab(), 'model' => 'license', 'action' => 'index', ] ), ] ) ->render() ); } /** * Index. */ public function index() { if ( ! is_user_logged_in() ) { return; } ob_start(); ?> id( 'customer-licenses-index' ) ->with( [ 'heading' => __( 'Licenses', 'surecart' ), 'isCustomer' => User::current()->isCustomer(), 'query' => [ 'customer_ids' => array_values( User::current()->customerIds() ), 'page' => 1, 'per_page' => 10, ], ] )->render() ); ?> id( 'sc-customer-license' ) ->with( [ 'licenseId' => $this->getId(), 'customerIds' => array_values( (array) User::current()->customerIds() ), ] ) ->render() ); ?>