1
0
mirror of synced 2025-01-29 22:31:42 +03:00

ref #93708 Adding filters after creating and updating order (#322)

This commit is contained in:
Kocmonavtik 2024-02-08 12:09:20 +03:00 committed by GitHub
parent f32fb6a4c4
commit 53ad81aec3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## 2024-02-07 4.7.3
* Added filters after creating and updating an order
## 2024-01-31 4.7.2
* Fixed error with send address by history

View File

@ -1 +1 @@
4.7.2
4.7.3

View File

@ -42,6 +42,10 @@
> retailcrm_shipping_list - позволяет изменить методы доставки с CMS.
> retailcrm_order_create_after - позволяет проверить создание заказа и произвести дополнительные действия
> retailcrm_order_update_after - позволяет проверить изменение заказа и произвести дополнительные действия
**Пример использования:**
```php
<?php

View File

@ -92,6 +92,9 @@ if (!class_exists('WC_Retailcrm_Orders')) :
$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()) {
return $response->getErrorString();
}
@ -276,6 +279,9 @@ if (!class_exists('WC_Retailcrm_Orders')) :
$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()) {
$this->payment = $this->orderUpdatePaymentType($wcOrder);
}
@ -633,4 +639,4 @@ if (!class_exists('WC_Retailcrm_Orders')) :
return $customerWasChanged;
}
}
endif;
endif;

View File

@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla
Requires PHP: 7.0
Requires at least: 5.3
Tested up to: 6.4
Stable tag: 4.7.2
Stable tag: 4.7.3
License: GPLv1 or later
License URI: http://www.gnu.org/licenses/gpl-1.0.html
@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
== Changelog ==
= 4.7.3 =
* Added filters after creating and updating an order
= 4.7.2 =
* Fixed error with send address by history

View File

@ -5,7 +5,7 @@
* Description: Integration plugin for WooCommerce & Simla.com
* Author: RetailDriver LLC
* Author URI: http://retailcrm.pro/
* Version: 4.7.2
* Version: 4.7.3
* Tested up to: 6.4
* WC requires at least: 5.4
* WC tested up to: 8.5

View File

@ -16,7 +16,7 @@
*
* @link https://wordpress.org/plugins/woo-retailcrm/
*
* @version 4.7.2
* @version 4.7.3
*
* @package RetailCRM
*/