diff --git a/includes/class-wc-gzd-product-variable.php b/includes/class-wc-gzd-product-variable.php index d236cdda6..e5f77fb45 100644 --- a/includes/class-wc-gzd-product-variable.php +++ b/includes/class-wc-gzd-product-variable.php @@ -4,9 +4,9 @@ exit; // Exit if accessed directly /** - * WooCommerce Germanized Abstract Product + * WooCommerce Germanized Product Variable * - * The WC_GZD_Product Class is used to offer additional functionality for every product type. + * The WC_GZD_Product_Variable Class is used to offer additional functionality for every variable product. * * @class WC_GZD_Product * @version 1.0.0 @@ -15,39 +15,39 @@ class WC_GZD_Product_Variable extends WC_GZD_Product { /** - * Get the min or max variation regular price. + * Get the min or max variation unit regular price. * @param string $min_or_max - min or max * @param boolean $display Whether the value is going to be displayed * @return string */ - public function get_variation_regular_price( $min_or_max = 'min', $display = false ) { - $prices = $this->get_variation_prices( $display ); + public function get_variation_unit_regular_price( $min_or_max = 'min', $display = false ) { + $prices = $this->get_variation_unit_prices( $display ); $price = 'min' === $min_or_max ? current( $prices['regular_price'] ) : end( $prices['regular_price'] ); - return apply_filters( 'woocommerce_get_variation_regular_price', $price, $this, $min_or_max, $display ); + return apply_filters( 'woocommerce_gzd_get_variation_unit_regular_price', $price, $this, $min_or_max, $display ); } /** - * Get the min or max variation sale price. + * Get the min or max variation unit sale price. * @param string $min_or_max - min or max * @param boolean $display Whether the value is going to be displayed * @return string */ - public function get_variation_sale_price( $min_or_max = 'min', $display = false ) { - $prices = $this->get_variation_prices( $display ); + public function get_variation_unit_sale_price( $min_or_max = 'min', $display = false ) { + $prices = $this->get_variation_unit_prices( $display ); $price = 'min' === $min_or_max ? current( $prices['sale_price'] ) : end( $prices['sale_price'] ); - return apply_filters( 'woocommerce_get_variation_sale_price', $price, $this, $min_or_max, $display ); + return apply_filters( 'woocommerce_gzd_get_variation_unit_sale_price', $price, $this, $min_or_max, $display ); } /** - * Get the min or max variation (active) price. + * Get the min or max variation (active) unit price. * @param string $min_or_max - min or max * @param boolean $display Whether the value is going to be displayed * @return string */ - public function get_variation_price( $min_or_max = 'min', $display = false ) { - $prices = $this->get_variation_prices( $display ); + public function get_variation_unit_price( $min_or_max = 'min', $display = false ) { + $prices = $this->get_variation_unit_prices( $display ); $price = 'min' === $min_or_max ? current( $prices['price'] ) : end( $prices['price'] ); - return apply_filters( 'woocommerce_get_variation_price', $price, $this, $min_or_max, $display ); + return apply_filters( 'woocommerce_gzd_get_variation_unit_price', $price, $this, $min_or_max, $display ); } /** diff --git a/readme.txt b/readme.txt index 9bdf9ace4..afb3a4287 100644 --- a/readme.txt +++ b/readme.txt @@ -176,6 +176,11 @@ Bugs sowie Hilfe bei der Arbeit an WooCommerce Germanized werden gerne über uns == Changelog == += 1.4.5 = +* Feature - WC_GZD_Product_Variable object containing get_variation_unit_price with min max option +* Fix - virtual vat calculation (vat exempt compatibility) +* Fix - email object $type check + = 1.4.4 = * Fix - in_array default option checkout diff --git a/woocommerce-germanized.php b/woocommerce-germanized.php index 0ed5c2391..7be100804 100644 --- a/woocommerce-germanized.php +++ b/woocommerce-germanized.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Germanized * Plugin URI: https://www.vendidero.de/woocommerce-germanized * Description: Extends WooCommerce to become a legally compliant store for the german market. - * Version: 1.4.4 + * Version: 1.4.5 * Author: Vendidero * Author URI: https://vendidero.de * Requires at least: 3.8 @@ -26,7 +26,7 @@ final class WooCommerce_Germanized { * * @var string */ - public $version = '1.4.4'; + public $version = '1.4.5'; /** * Single instance of WooCommerce Germanized Main Class