Skip to content

Commit

Permalink
Merge branch 'develop' into hotfix/add-debug-order
Browse files Browse the repository at this point in the history
  • Loading branch information
supercid authored Dec 27, 2023
2 parents b1cd81e + a7c590d commit 1189117
Show file tree
Hide file tree
Showing 5 changed files with 501 additions and 360 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ All notable changes to this project will be documented in this file. This projec

### Unreleased
* Replace deprecated Zend_db_select usage
* Update Yotpo compatibility to > 4.1 and remove < 3.3

### 7.3.1
* Fix issue with category export where default categories were not exported correctly
Expand Down
6 changes: 3 additions & 3 deletions Helper/Ratings.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private function getRatingsFromProviders(Product $product, Store $store)
try {
$this->setRegistryProduct($product);

$ratings = $this->ratingsFactory->create()->getRichSnippet();
$ratings = $this->ratingsFactory->create()->getRichSnippet($product->getId());
} catch (Exception $e) {
$this->resetRegistryProduct();
$this->logger->exception($e);
Expand Down Expand Up @@ -254,9 +254,9 @@ private function buildReviewCount(Product $product, Store $store)
*/
public function canUseYotpo()
{
if ($this->moduleManager->isEnabled('Yotpo_Yotpo') &&
if ($this->moduleManager->isEnabled('Yotpo_Reviews') &&
// phpcs:ignore
class_exists('Yotpo\Yotpo\Helper\RichSnippets') &&
class_exists('Yotpo\Reviews\Model\Sync\RichSnippets') &&
method_exists($this->ratingsFactory->create(), 'getRichSnippet')
) {
return true;
Expand Down
4 changes: 2 additions & 2 deletions Helper/RatingsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
namespace Nosto\Tagging\Helper;

use Magento\Framework\ObjectManagerInterface;
use Yotpo\Yotpo\Helper\RichSnippets;
use Yotpo\Reviews\Model\Sync\RichSnippets;

class RatingsFactory
{
Expand All @@ -62,6 +62,6 @@ public function __construct(ObjectManagerInterface $objectManager)
public function create()
{
/** @phan-suppress-next-line PhanUndeclaredTypeReturnType */
return $this->objectManager->create('Yotpo\Yotpo\Helper\RichSnippets'); // @codingStandardsIgnoreLine
return $this->objectManager->create('Yotpo\Reviews\Model\Sync\RichSnippets'); // @codingStandardsIgnoreLine
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"magento/module-asynchronous-operations": "100.4.3",
"phan/phan": "5.3.0",
"drenso/phan-extensions": "3.5.1",
"yotpo/module-review": "^2.9",
"yotpo/module-yotpo-combined": "^4.1",
"phpunit/phpunit": "~9.5.18"
},
"suggest": {
"magento/product-community-edition": "2.*",
"yotpo/module-review": "^2.9"
"yotpo/module-yotpo-combined": "^4.1"
},
"license": [
"OSL-3.0"
Expand Down
Loading

0 comments on commit 1189117

Please sign in to comment.