[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
1 changed files with 4 additions and 4 deletions

View File

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