• Resolved azralth

    (@azralth)


    Hi !

    I need help with a plugin I’m developing. In admin plugin page i have this
    Strict Standards: Declaration of Lkreservation\TransferReservation::prepare_items() should be compatible with WP_List_Table::prepare_items() in /home/alpsairp/www/dev_lk/wp-content/plugins/lk-reservation/lkreservation/TransferReservation.php on line 417

    Here is my function who’s calling prepare_items :

    	public function prepare_items($type) {
    		
    		$columns 	= $this->get_columns();
    		$sortable 	= $this->get_sortable_columns();
    		$hidden 	= ['nb_reservation'];
    
    		$this->_column_headers = [
    			$columns, $hidden, $sortable
    		];
    
    		/** Process bulk action */
    		$this->process_bulk_action();
    
    		$per_page = $this->get_items_per_page('checkout_per_page', 10);
    		$current_page = $this->get_pagenum();
    		$total_items = self::record_count();
    
    		$this->set_pagination_args([
    			'total_items' => $total_items, //WE have to calculate the total number of items
    			'per_page' => $per_page //WE have to determine how many items to show on a page
    		]);
    
    		$this->items = self::get_checkout($per_page, $current_page, $type);
    	}

    get_checkout is a simple function running an sql call and return an array.

    Can you help me with this ?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘::prepare_items() should be compatible with WP_List_Table::prepare_items()’ is closed to new replies.