You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'This hook allows modules to provide a custom PDF renderer (PDFGenerator) for generating PDF documents like invoices, delivery slips, and order returns.'
18
+
19
+
---
20
+
21
+
{{% hookDescriptor %}}
22
+
23
+
## Parameters
24
+
25
+
```php
26
+
[
27
+
'template' => $template, // Template type string (e.g., 'Invoice', 'OrderReturn')
28
+
'orientation' => $orientation, // Page orientation ('P' for portrait, 'L' for landscape)
29
+
]
30
+
```
31
+
32
+
## Expected return value
33
+
34
+
Return a `PDFGenerator` instance to use a custom renderer, or `null` to use the default TCPDF-based renderer.
35
+
36
+
## Call of the Hook in the origin file
37
+
38
+
```php
39
+
$renderers = Hook::exec(
40
+
'actionGetPdfRenderer',
41
+
[
42
+
'template' => $template,
43
+
'orientation' => $orientation,
44
+
],
45
+
null,
46
+
true
47
+
);
48
+
```
49
+
50
+
## Example usage
51
+
52
+
```php
53
+
public function hookActionGetPdfRenderer($params)
54
+
{
55
+
// Use a custom PDF library for all templates
56
+
return new MyCustomPdfGenerator($params['orientation']);
57
+
}
58
+
```
59
+
60
+
## Use cases
61
+
62
+
This hook is useful when you need to:
63
+
64
+
- Use a different PDF library (e.g., Dompdf, mPDF) instead of the default TCPDF
65
+
- Apply custom PDF settings globally (fonts, margins, headers)
66
+
- Implement PDF/A compliance for archiving
67
+
- Add watermarks or security features to all generated PDFs
description: 'This hook allows modules to override the default PDF template object used for generating PDFs like invoices, delivery slips, and order returns.'
18
+
19
+
---
20
+
21
+
{{% hookDescriptor %}}
22
+
23
+
## Parameters
24
+
25
+
```php
26
+
[
27
+
'object' => $object, // The source object (Order, OrderReturn, etc.)
Copy file name to clipboardExpand all lines: modules/core-updates/9.0.md
+69-5Lines changed: 69 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Changes in PrestaShop 9.0
3
-
menuTitle: Changes in 9.0
2
+
title: Changes in PrestaShop 9.0.x
3
+
menuTitle: Changes in 9.0.x
4
4
useMermaid: true
5
5
---
6
6
@@ -12,9 +12,14 @@ useMermaid: true
12
12
#body-inner depre::before {content: ' – '}
13
13
</style>
14
14
15
-
# Notable changes in PrestaShop 9.0
15
+
# Notable changes in PrestaShop 9.0.x
16
16
17
-
This section provides a list of the most significant changes in PrestaShop 9.0. While this list is not exhaustive, it aims to give developers a clear overview of the important updates. If you notice any missing or incorrect information, please help us improve by creating an issue on our [GitHub repository](https://github.com/PrestaShop/docs/issues/new).
17
+
This section provides a list of the most significant changes in PrestaShop 9.0.x. While this list is not exhaustive, it aims to give developers a clear overview of the important updates. If you notice any missing or incorrect information, please help us improve by creating an issue on our [GitHub repository](https://github.com/PrestaShop/docs/issues/new).
@@ -797,4 +802,63 @@ The PrestaShop back office consists of [two themes][bo-themes]. Both themes have
797
802
- [You can now use `{categories}` inside category URL pattern](https://github.com/PrestaShop/PrestaShop/pull/38527)
798
803
- [Default category of the product is now removed from the URL](https://github.com/PrestaShop/PrestaShop/pull/37467)
799
804
- [Meta keywords are no longer used in PrestaShop 9. You need to adjust your solutions not to rely on "meta_keywords" since the field is no longer available](https://github.com/PrestaShop/PrestaShop/pull/36873)
800
-
- [You can now manage FeatureFlags settings in a different storage than the database](https://github.com/PrestaShop/PrestaShop/pull/32923)
805
+
- [You can now manage FeatureFlags settings in a different storage than the database](https://github.com/PrestaShop/PrestaShop/pull/32923)
806
+
807
+
## Patch releases
808
+
809
+
### PrestaShop 9.0.1
810
+
811
+
Released on October 13, 2025. This patch release includes bug fixes and several improvements for module developers.
812
+
813
+
#### New hooks
814
+
815
+
The following hooks were added in 9.0.1:
816
+
817
+
| Hook | Description |
818
+
|------|-------------|
819
+
| [`actionOrderHasBeenShipped`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionOrderHasBeenShipped" >}}) | Triggered when an order status changes to "shipped" |
820
+
| [`actionOrderHasBeenDelivered`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionOrderHasBeenDelivered" >}}) | Triggered when an order status changes to "delivered" |
821
+
| [`actionPaymentModuleProductVarTplAfter`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionPaymentModuleProductVarTplAfter" >}}) | Allows modification of product variables in payment module templates |
822
+
| [`actionGetPdfTemplateObject`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionGetPdfTemplateObject" >}}) | Customize PDF template objects before rendering |
823
+
| [`actionCheckoutStepRenderTemplate`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionCheckoutStepRenderTemplate" >}}) | Triggered when rendering a checkout step template |
824
+
825
+
#### Notable improvements
826
+
827
+
- [**TinyMCE Editor extensibility**](https://github.com/PrestaShop/PrestaShop/pull/39277): The TinyMCE Editor is now more flexible for module extensions
828
+
- [**Enhanced `Tools::unSerialize` security**](https://github.com/PrestaShop/PrestaShop/pull/38822): Additional security measures were added to prevent potential deserialization vulnerabilities
829
+
- [**Text email auto-generation**](https://github.com/PrestaShop/PrestaShop/pull/39063): New option to automatically generate text versions of email templates
830
+
- [**Symfony components updated to 6.4.25**](https://github.com/PrestaShop/PrestaShop/pull/39466)
831
+
832
+
---
833
+
834
+
### PrestaShop 9.0.2
835
+
836
+
Released on December 10, 2025. This patch release includes important fixes and a breaking change for Admin API resources.
837
+
838
+
#### Breaking change
839
+
840
+
{{% notice warning %}}
841
+
**[Module API resources updated to version 0.2.0](https://github.com/PrestaShop/PrestaShop/pull/40212)**
842
+
843
+
If your module uses the Admin API resources, you may need to update your implementation. The API normalization mapper indexes have been enhanced, which could affect how your module interacts with the API.
844
+
{{% /notice %}}
845
+
846
+
#### New hooks
847
+
848
+
The following hooks were added in 9.0.2 for stock and quantity management:
849
+
850
+
| Hook | Description |
851
+
|------|-------------|
852
+
| [`actionOverrideQuantityAvailableByProduct`]({{< relref "/9/modules/concepts/hooks/list-of-hooks/actionOverrideQuantityAvailableByProduct" >}}) | Override the available quantity for a product |
These hooks are particularly useful for modules that manage stock across multiple warehouses or implement custom inventory logic.
857
+
858
+
#### Hook fix
859
+
860
+
{{% notice info %}}
861
+
**[`actionAttributeCombinationSave` now works correctly](https://github.com/PrestaShop/PrestaShop/pull/38617)**
862
+
863
+
The `actionAttributeCombinationSave` hook was never being triggered in PrestaShop 9.0.0. This has been fixed in 9.0.2. If you have modules that rely on this hook, they will now function as expected.
0 commit comments