Plugin Directory

Changeset 2376557


Ignore:
Timestamp:
09/07/2020 01:46:29 PM (5 years ago)
Author:
mechuram
Message:

2.0.6 - Bug-fix - Improper Cart price with tax display

Location:
woo-price-per-unit/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • woo-price-per-unit/trunk/languages/woo-price-per-unit-cs_CZ.po

    r2305604 r2376557  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: WooCommerce Price Per Unit 2.0.5\n"
     3"Project-Id-Version: WooCommerce Price Per Unit 2.0.6\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2020-05-15 13:31+0200\n"
    6 "PO-Revision-Date: 2020-05-15 13:37+0200\n"
     5"POT-Creation-Date: 2020-09-07 13:04+0200\n"
     6"PO-Revision-Date: 2020-09-07 13:04+0200\n"
    77"Last-Translator: administrator <[email protected]>\n"
    88"Language-Team: Czech\n"
     
    1111"Content-Type: text/plain; charset=UTF-8\n"
    1212"Content-Transfer-Encoding: 8bit\n"
    13 "X-Generator: Poedit 2.3.1\n"
     13"X-Generator: Poedit 2.4.1\n"
    1414"X-Poedit-SourceCharset: UTF-8\n"
    1515"X-Poedit-KeywordsList: __;_x;_e;_ex;_n\n"
  • woo-price-per-unit/trunk/languages/woo-price-per-unit.pot

    r2305604 r2376557  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: WooCommerce Price Per Unit 2.0.5\n"
    7 "POT-Creation-Date: 2020-05-15 13:31+0200\n"
     6"Project-Id-Version: WooCommerce Price Per Unit 2.0.6\n"
     7"POT-Creation-Date: 2020-09-07 13:04+0200\n"
    88"PO-Revision-Date: 2017-04-06 16:00-0500\n"
    99"Last-Translator: Martin Mechura\n"
     
    1313"Content-Type: text/plain; charset=UTF-8\n"
    1414"Content-Transfer-Encoding: 8bit\n"
    15 "X-Generator: Poedit 2.3.1\n"
     15"X-Generator: Poedit 2.4.1\n"
    1616"X-Poedit-SourceCharset: UTF-8\n"
    17 "X-Poedit-KeywordsList: __;_x:1,2c;_e;_ex:1,2c;_n:1,2;_nx:1,2,4c;esc_html__;esc_attr__\n"
     17"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;esc_attr__;esc_html__;esc_html_e;esc_html_x:1,2c;_nx_noop:1,2,3c\n"
    1818"X-Poedit-Basepath: ..\n"
    1919"X-Poedit-SearchPath-0: .\n"
  • woo-price-per-unit/trunk/readme.txt

    r2305625 r2376557  
    22Contributors: mechuram
    33Tags: woocommerce, price, weight, price customization
    4 Stable tag: 2.0.5
     4Stable tag: 2.0.6
    55Requires PHP: 7.0
    6 Tested up to: 5.4
     6Tested up to: 5.5
    77Requires at least: 4.4
    88
     
    8080**Changelog**
    8181
     82**2.0.6**
     83– Bug-fix – In certain configurations price  with taxes was displayed improperly in Cart
     84
    8285**2.0.5**
    8386– Bug-fix – Improper price display with taxes
     
    200203== Changelog ==
    201204
     205= 2.0.6 =
     206– Bug-fix – In certain configurations price  with taxes was displayed improperly in Cart
     207
    202208= 2.0.5 =
    203209– Bug-fix – Improper price display with taxes
  • woo-price-per-unit/trunk/woo-price-per-unit.php

    r2305604 r2376557  
    44Plugin URI: https://mechcomp.cz/price-per-unit-pro/
    55Description: WooCommerce Price Per Unit allows the user to show prices recalculated per units(weight) and do some customization to the look of the prices
    6 Version: 2.0.5
     6Version: 2.0.6
    77Author: Martin Mechura
    88Author URI: http://mechcomp.cz
    99Text Domain: woo-price-per-unit
    10 WC tested up to: 4.1.0
     10WC tested up to: 4.4.1
    1111WC requires at least: 3.0
    1212
     
    588588    public function custom_cart_price($price_text, $product_data, $cart_key)
    589589    {
     590        global $woocommerce;
     591
    590592        if (is_null($product_data)){
    591593            return $price_text;
     
    606608            return $price_text;
    607609        }
    608         $round_prices = get_option('_mcmp_ppu_disable_price_rounding') == 'yes' ? false : true;
    609         $normal_price = wc_get_price_to_display($product, array('price' => $normal_price));
     610        $round_prices = get_option('_mcmp_ppu_disable_price_rounding') == 'yes' ? false : true;
     611        if ( $woocommerce->cart->display_prices_including_tax() ) {
     612            $normal_price = wc_get_price_including_tax( $product );
     613        } else {
     614            $normal_price = wc_get_price_excluding_tax( $product );
     615        }
     616        //$normal_price = wc_get_price_to_display($product, array('price' => $normal_price));
    610617        $normal_price = $normal_price / $weight;
    611618        $normal_price = $this->price_ratio_calc($normal_price, $product_id);
Note: See TracChangeset for help on using the changeset viewer.