Plugin Directory

Changeset 1876959


Ignore:
Timestamp:
05/18/2018 07:41:34 AM (8 years ago)
Author:
avecdo
Message:

Minor fix to reduce load when fetching products, and calculating if the product prices are tax inclusive

Location:
avecdo-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • avecdo-for-woocommerce/trunk/avecdo.php

    r1862752 r1876959  
    44 * Plugin URI: http://avecdo.com/
    55 * Description: avecdo connector plugin for WooCommerce
    6  * Version: 1.3.7
     6 * Version: 1.3.8
    77 * Author: Modified Solutions ApS
    88 * Author URI: https://www.modified.dk/
     
    2929 * @var string Version string
    3030 */
    31 define('AVECDO_WOOCOMMERCE_PLUGIN_VERSION', '1.3.7');
     31define('AVECDO_WOOCOMMERCE_PLUGIN_VERSION', '1.3.8');
    3232
    3333/**
  • avecdo-for-woocommerce/trunk/models/Model.php

    r1855018 r1876959  
    131131    private function assignAvecdoProductMetaData($productId, $avecdoProduct, array &$imagesIds)
    132132    {
    133         /* @todo temp fix, we need the price calculator, so just for now we make this object. */
    134         $product = wc_get_product($productId);
     133        if ('yes' !== get_option( 'woocommerce_prices_include_tax')) {
     134            $product = wc_get_product($productId);
     135        }
    135136        $galleryImages = array();
    136137        $thumbnailImages = array();
     
    158159                case "_regular_price":
    159160                    $method  = "setPrice";
    160                     if ($product) {
     161                    if ('yes' !== get_option( 'woocommerce_prices_include_tax') && $product) {
    161162                        $metaValue = (float) $this->getPriceIncludingTax($product, $metaRow->meta_value, 1);
    162163                    } else {
     
    185186                case "_sale_price":
    186187                    $salePrice = (float) $this->getSalePrice($productId);
    187                     if ($product) {
     188                    if ('yes' !== get_option( 'woocommerce_prices_include_tax') && $product) {
    188189                        $salePrice = (float) $this->getPriceIncludingTax($product, $salePrice, 1);
    189190                    }
  • avecdo-for-woocommerce/trunk/readme.txt

    r1862752 r1876959  
    33Tags: feed, service, avecdo, Facebook, Google Shopping, shopping, woocommerce, kelkoo, miinto, Pricerunner, Partner-ads, ecommerce, e-commerce
    44Requires at least: 3.5
    5 Tested up to: 4.9.5
    6 Stable tag: 1.3.7
     5Tested up to: 4.9.6
     6Stable tag: 1.3.8
    77License: Mozilla Public License Version 2.0
    88License URI: https://www.mozilla.org/en-US/MPL/2.0/
     
    4545
    4646== Changelog ==
     47
     48= 1.3.8 =
     49* Minor fix to reduce load when fetching products, and calculating if the product prices are tax inclusive. Tested with WordpPress 4.9.6
    4750
    4851= 1.3.7 =
Note: See TracChangeset for help on using the changeset viewer.