Plugin Directory

Changeset 2653157


Ignore:
Timestamp:
01/05/2022 02:48:51 PM (4 years ago)
Author:
Easify
Message:

Version 4.34

Location:
easify-server-woocommerce/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • easify-server-woocommerce/trunk/easify.php

    r2626787 r2653157  
    55 * Plugin URI: http://www.easify.co.uk/wordpress/
    66 * Description: Connects Easify Business Management, EPOS (Electronic Point of Sale) and invoicing software to your WooCommerce enabled WordPress website. Allowing you to keep your online and offline shop's orders and stock control synchronised.
    7  * Version: 4.33
     7 * Version: 4.34
    88 * License: GPL2
    99 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1919
    2020/**
    21  * Copyright (C) 2020  Easify Ltd (email:support@easify.co.uk)
     21 * Copyright (C) 2022  Easify Ltd (email:support@easify.co.uk)
    2222 * This program is free software; you can redistribute it and/or
    2323 * modify it under the terms of the GNU General Public License
  • easify-server-woocommerce/trunk/includes/class-easify-wc-plugin-settings-page.php

    r2626787 r2653157  
    3030 *
    3131 * @class       Easify_WC__Plugin_Settings_Page
    32  * @version     4.33
     32 * @version     4.34
    3333 * @package     easify-woocommerce-connector
    3434 * @author      Easify
     
    19111911                product price and stock level changes will be uploaded to WooCommerce. Editing the product image,
    19121912                tags, description etc... will not modify the product in WooCommerce.</p>
     1913                <p><strong>Note:</strong> You can disable uploading of product stock levels by un-ticking the <b>Enable
     1914                 stock control for this product</b> checkbox on the <b>Stock Levels</b> tab of the product in Easify Pro.</p>
    19131915                <p><strong>Note:</strong> You can also prevent product price and stock level changes from being uploaded using
    19141916                the options above.</p>
  • easify-server-woocommerce/trunk/includes/class-easify-wc-shop.php

    r2505312 r2653157  
    2828 *
    2929 * @class       Easify_Generic_Shop
    30  * @version     4.31
     30 * @version     4.34
    3131 * @package     easify-woocommerce-connector
    3232 * @author      Easify
     
    227227            // STOCK LEVELS         
    228228            $updateStockLevels = !$this->easify_options->get_easify_dont_update_product_stock_levels();
    229            
    230             if ($updateStockLevels)
    231             {           
    232                 Easify_Logging::Log("Easify_WC_Shop.UpdateProduct() - Updating of stock levels enabled.");
    233                
     229
     230            $productStockControlEnabledInEasify = $Product->Allocatable;
     231
     232            if (!$productStockControlEnabledInEasify) {
     233                Easify_Logging::Log('Easify_WC_Shop.UpdateProduct() - Stock control not enabled in Easify, ignoring stock level update.');
     234            }
     235
     236            if ($updateStockLevels && $productStockControlEnabledInEasify)
     237            {
     238                Easify_Logging::Log("Easify_WC_Shop.UpdateProduct() - Updating of stock levels enabled.");
     239
    234240                // handling stock - we get free stock minus allocated stock
    235241                $stock_level = $Product->StockLevel - $this->easify_server->get_allocation_count_by_easify_sku($Product->SKU);
     
    420426 
    421427            $Product = $this->easify_server->GetProductFromEasify($EasifySku);
    422            
     428
     429            if ($Product->Allocatable == FALSE) {
     430                Easify_Logging::Log('Easify_WC_Shop.UpdateProductStockLevel() - Stock control not enabled in Easify, ignoring update.');
     431                return;
     432            }
     433
    423434            if ($Product->Published == FALSE) {
    424435                Easify_Logging::Log('Easify_WC_Shop.UpdateProductStockLevel() - Not published, ignoring update.');
  • easify-server-woocommerce/trunk/readme.txt

    r2626787 r2653157  
    55Requires at least: 5.0
    66Tested up to: 5.8
    7 Stable tag: 4.33
     7Stable tag: 4.34
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    101101
    102102== Changelog ==
     103= 4.34 =
     104* Resolved issue where disabling stock control for a product in Easify still caused stock levels to be uploaded to
     105* website when product modified in Easify.
    103106= 4.33 =
    104107* Added 'General' config tab to allow configuration of web server instance id to improve handling of records sent to
     
    206209
    207210== Upgrade Notice ==
    208 = 4.33 =
    209 * Added 'General' config tab to allow configuration of web server instance id to improve handling of records sent to
    210 * Easify Server when connecting multiple websites to a single Easify Server.
     211= 4.34 =
     212* Resolved issue where disabling stock control for a product in Easify still caused stock levels to be uploaded to
     213* website when product modified in Easify.
Note: See TracChangeset for help on using the changeset viewer.