Skip to content

Commit 4da1a1f

Browse files
authored
Update QueryBuilderTrait.php
1 parent e51ebce commit 4da1a1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Traits/QueryBuilderTrait.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ protected function paginate($per_page = 10, $current_page = 1, $options = [])
327327
$this->options[$option] = $value;
328328
}
329329

330-
$results = $this->get();
330+
$data = $this->get();
331331
$totalResults = WooCommerce::countResults();
332332
$totalPages = WooCommerce::countPages();
333333
$currentPage = WooCommerce::current();
@@ -344,7 +344,10 @@ protected function paginate($per_page = 10, $current_page = 1, $options = [])
344344
'last_page' => $totalResults,
345345
];
346346

347-
$results['pagination'] = $pagination;
347+
$results = [
348+
'pagination' => $pagination,
349+
'data' => $data,
350+
];
348351

349352
if ($this->isLazyCollection) {
350353
return LazyCollection::make($results);

0 commit comments

Comments
 (0)