From 5e21d2260e490bdeab9d5f2675e1b0a622986c86 Mon Sep 17 00:00:00 2001 From: Ivan Chaplygin Date: Thu, 8 Feb 2024 10:50:39 +0300 Subject: [PATCH] ref #93708 Adding comments to filters --- src/include/class-wc-retailcrm-orders.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/include/class-wc-retailcrm-orders.php b/src/include/class-wc-retailcrm-orders.php index eb6b7d6..4b202b3 100644 --- a/src/include/class-wc-retailcrm-orders.php +++ b/src/include/class-wc-retailcrm-orders.php @@ -91,6 +91,8 @@ if (!class_exists('WC_Retailcrm_Orders')) : $this->processOrder($wcOrder); $response = $this->retailcrm->ordersCreate($this->order); + + // Allows you to verify order creation and perform additional actions $response = apply_filters('retailcrm_order_create_after', $response, $wcOrder); if (!$response instanceof WC_Retailcrm_Response || !$response->isSuccessful()) { @@ -276,6 +278,8 @@ if (!class_exists('WC_Retailcrm_Orders')) : $this->processOrder($wcOrder, true); $response = $this->retailcrm->ordersEdit($this->order); + + // Allows you to verify order changes and perform additional actions $response = apply_filters('retailcrm_order_update_after', $response, $wcOrder); if ($response instanceof WC_Retailcrm_Response && $response->isSuccessful()) {