1
0
mirror of synced 2025-01-31 07:11:42 +03:00

create order from adminpanel

This commit is contained in:
Pavel 2020-07-08 16:00:57 +03:00 committed by GitHub
parent ea03321667
commit 53f6327da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,6 +86,7 @@ if (!class_exists('WC_Retailcrm_Base')) {
add_action('wp_print_scripts', array($this, 'initialize_analytics'), 98);
add_action('wp_print_scripts', array($this, 'initialize_daemon_collector'), 99);
add_action('wp_print_footer_scripts', array($this, 'send_analytics'), 99);
add_action('woocommerce_new_order', array($this, 'create_order'), 11, 1);
if (!$this->get_option('deactivate_update_order')
|| $this->get_option('deactivate_update_order') == static::NO
@ -271,6 +272,18 @@ if (!class_exists('WC_Retailcrm_Base')) {
$this->customers->updateCustomer($customer_id);
}
/**
* Create order in retailCRM from admin panel
*
* @param int $order_id
*/
public function create_order($order_id)
{
if (is_admin()) {
$this->retailcrm_process_order($order_id);
}
}
/**
* Edit order in retailCRM
* @param int $order_id