[PepperBridgeAbstract] Fix deal origin (#3605)

Origin display has chenged : this commit follow the websites changes.

Fixes #3521
This commit is contained in:
sysadminstory 2023-08-09 17:36:02 +02:00 committed by GitHub
parent f3896ed543
commit 1fcf67f14a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -393,10 +393,10 @@ HEREDOC;
*/
private function getSource($deal)
{
if ($deal->find('a[class*=text--color-greyShade]', 0) != null) {
return '<div>' . $this->i8n('origin') . ' : '
. $deal->find('a[class*=text--color-greyShade]', 0)->outertext
. '</div>';
if (($origin = $deal->find('button[class*=text--color-greyShade]', 0)) != null) {
$path = str_replace(' ', '/', trim(Json::decode($origin->{'data-cloak-link'})['path']));
$text = $origin->find('span[class*=cept-merchant-name]', 0);
return '<div>' . $this->i8n('origin') . ' : <a href="' . static::URI . $path . '">' . $text . '</a></div>';
} else {
return '';
}