Fix api request (#15)
This commit is contained in:
parent
3ce1885da0
commit
88f502a878
@ -84,7 +84,7 @@ if ( ! class_exists( 'WC_Retailcrm_Base' ) ) :
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($this->get_option( 'api_url' ) != '' && $this->get_option( 'api_key' ) != '') {
|
if ($this->get_option( 'api_url' ) != '' && $this->get_option( 'api_key' ) != '') {
|
||||||
|
if (isset($_GET['page']) && $_GET['page'] == 'wc-settings' && isset($_GET['tab']) && $_GET['tab'] == 'integration') {
|
||||||
$retailcrm = new WC_Retailcrm_Proxy(
|
$retailcrm = new WC_Retailcrm_Proxy(
|
||||||
$this->get_option( 'api_url' ),
|
$this->get_option( 'api_url' ),
|
||||||
$this->get_option( 'api_key' ),
|
$this->get_option( 'api_key' ),
|
||||||
@ -241,6 +241,7 @@ if ( ! class_exists( 'WC_Retailcrm_Base' ) ) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function generate_button_html( $key, $data ) {
|
public function generate_button_html( $key, $data ) {
|
||||||
$field = $this->plugin_id . $this->id . '_' . $key;
|
$field = $this->plugin_id . $this->id . '_' . $key;
|
||||||
|
@ -368,7 +368,9 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
|
|||||||
|
|
||||||
if (!empty($attributes)) {
|
if (!empty($attributes)) {
|
||||||
foreach ($attributes as $attribute_name => $attribute) {
|
foreach ($attributes as $attribute_name => $attribute) {
|
||||||
$attributeValue = end(get_post_meta($product->get_id(), 'attribute_'.$attribute_name));
|
$id_product = $product->get_id();
|
||||||
|
$arrAttributeValue = get_post_meta($id_product, 'attribute_'.$attribute_name);
|
||||||
|
$attributeValue = end($arrAttributeValue);
|
||||||
if ($attribute['is_visible'] == 1 && !empty($attribute['value'])) {
|
if ($attribute['is_visible'] == 1 && !empty($attribute['value'])) {
|
||||||
$params[] = array(
|
$params[] = array(
|
||||||
'code' => $attribute_name,
|
'code' => $attribute_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user