Merge pull request #57 from iyzoer/master
* Исправлена ошибка при активированном модуле без настроек * Добавлен фильтр при формировании массива заказа * Исправлена генерация icml с неполной картинкой товара
This commit is contained in:
commit
7ad9ae7886
@ -1,3 +1,8 @@
|
||||
## 2018-03-22 v.2.1.4
|
||||
* Исправлена ошибка при активированном модуле без настроек
|
||||
* Добавлен фильтр при формировании массива заказа
|
||||
* Исправлена генерация icml с неполной картинкой товара
|
||||
|
||||
## 2018-03-22 v.2.1.3
|
||||
* Исправлена ошибка на php5.3
|
||||
|
||||
|
@ -416,16 +416,16 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
|
||||
*/
|
||||
private function setOffer(&$full_product_list, $product_attributes, $product, $parent = false) {
|
||||
if ($parent) {
|
||||
$image = wp_get_attachment_image_src($product->get_image_id());
|
||||
$image = wp_get_attachment_image_src($product->get_image_id(), 'full');
|
||||
|
||||
if (!$image) {
|
||||
$image = wp_get_attachment_image_src($parent->get_image_id());
|
||||
$image = wp_get_attachment_image_src($parent->get_image_id(), 'full');
|
||||
}
|
||||
|
||||
$term_list = $parent->get_category_ids();
|
||||
$attributes = get_post_meta($parent->get_id(), '_product_attributes');
|
||||
} else {
|
||||
$image = wp_get_attachment_image_src($product->get_image_id());
|
||||
$image = wp_get_attachment_image_src($product->get_image_id(), 'full');
|
||||
$term_list = $product->get_category_ids();
|
||||
$attributes = get_post_meta($product->get_id(), '_product_attributes');
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ if ( ! class_exists( 'WC_Retailcrm_Orders' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
return $order_data;
|
||||
return apply_filters('retailcrm_process_order', $order_data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Version: 2.1.3
|
||||
* Version: 2.1.4
|
||||
* Plugin Name: WooCommerce RetailCRM
|
||||
* Plugin URI: https://wordpress.org/plugins/woo-retailcrm/
|
||||
* Description: Integration plugin for WooCommerce & RetailCRM
|
||||
@ -362,7 +362,10 @@ function update_order($order_id) {
|
||||
}
|
||||
|
||||
function initialize_analytics() {
|
||||
$options = array_filter(get_option( 'woocommerce_integration-retailcrm_settings' ));
|
||||
$options = get_option('woocommerce_integration-retailcrm_settings');
|
||||
|
||||
if ($options && is_array($options)) {
|
||||
$options = array_filter($options);
|
||||
|
||||
if (isset($options['ua']) && $options['ua'] == 'yes') {
|
||||
?>
|
||||
@ -387,9 +390,13 @@ function initialize_analytics() {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function send_analytics() {
|
||||
$options = array_filter(get_option( 'woocommerce_integration-retailcrm_settings' ));
|
||||
$options = get_option('woocommerce_integration-retailcrm_settings');
|
||||
|
||||
if ($options && is_array($options)) {
|
||||
$options = array_filter($options);
|
||||
|
||||
if (isset($_GET['key']) && isset($options['ua']) && $options['ua'] == 'yes') {
|
||||
$orderid = wc_get_order_id_by_order_key($_GET['key']);
|
||||
@ -404,9 +411,10 @@ function send_analytics() {
|
||||
'price' => (float)$_product->get_price(),
|
||||
'quantity' => $item['qty'],
|
||||
);
|
||||
}
|
||||
|
||||
$order_items[] = $order_item;
|
||||
}
|
||||
}
|
||||
|
||||
$url = parse_url(get_site_url());
|
||||
$domain = $url['host'];
|
||||
@ -436,6 +444,7 @@ function send_analytics() {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function retailcrm_load_plugin_textdomain() {
|
||||
load_plugin_textdomain('retailcrm', FALSE, basename( dirname( __FILE__ ) ) . '/languages/');
|
||||
|
@ -15,7 +15,7 @@
|
||||
*
|
||||
*
|
||||
* @link https://wordpress.org/plugins/woo-retailcrm/
|
||||
* @since 2.1.3
|
||||
* @since 2.1.4
|
||||
*
|
||||
* @package RetailCRM
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user