Skip to content

Commit 5b24dd6

Browse files
authored
Merge pull request #414 from Zasilkovna/PES-3059-library-js
PES-3059: load library js only for order page
2 parents 498fd29 + 8ea5aed commit 5b24dd6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packetery/CHANGE_LOG.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- Updated: Loading the widget javascript library only on the checkout page.
12
- Updated: Multiple issues form PrestaShop validator resolved.
23
- Updated: Added company to shipment submission via API.
34
- Updated: Removed czech language from slovak translations.

packetery/packetery.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,10 @@ public function hookDisplayBeforeCarrier(array $params)
857857
*/
858858
public function hookDisplayHeader()
859859
{
860+
// @phpstan-ignore class.notFound
861+
if ($this->context->controller->php_self !== 'order') {
862+
return;
863+
}
860864
$jsList = [
861865
'front.js',
862866
];

0 commit comments

Comments
 (0)