Skip to content

Commit

Permalink
Fix sitemap page count
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesedmonston authored Feb 16, 2024
1 parent dc9fa7f commit cdbbe39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/SitemapService.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,14 @@ private function _getPageCount (Element $type, $id)
*/
private function _setCriteriaIdByType ($criteria, Element $type, $id)
{
switch ($type::className()) {
case 'Entry':
switch ($type::class) {
case 'craft\\elements\\Entry':
$criteria->sectionId = $id;
break;
case 'Category':
case 'craft\\elements\\Category':
$criteria->groupId = $id;
break;
case 'Product':
case 'craft\\elements\\Product':
$criteria->typeId = $id;
break;
}
Expand Down

0 comments on commit cdbbe39

Please sign in to comment.