Release PrestaShop 1.2.0: use hook contracts

This commit is contained in:
fatequod
2026-09-30 08:26:55 +02:00
parent 6b5e03246e
commit 599a7b9863
25 changed files with 276 additions and 62 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
const { requestHook } = require('../src/hook-contract');
const { Core } = require('@orbito/api-lib');
const PrestashopApi = require('../src/PrestaApi');
const { importFromPSOrder } = require('../src/OrderImporter');
@@ -29,7 +30,7 @@ module.exports = async function(params, ctx) {
const errors = [];
for (const order of orders) {
const uniqueId = order.reference + ':' + order.id;
const searchResult = await Core.callModule( 'core/orders', 'search', {
const searchResult = await requestHook(Core, 'orders.search', {
// własny kod modułu bierzemy z core (po rejestracji), nie z hardcode'u
source: { moduleCode: Core.getModuleInfo().code, uniqueId }
});