diff --git a/includes/shortcodes/class-alg-products-shortcodes.php b/includes/shortcodes/class-alg-products-shortcodes.php index 318c22a..a8071a3 100644 --- a/includes/shortcodes/class-alg-products-shortcodes.php +++ b/includes/shortcodes/class-alg-products-shortcodes.php @@ -2,7 +2,7 @@ /** * Product XML Feeds for WooCommerce - Products Shortcodes * - * @version 2.7.17 + * @version 2.7.18 * @since 1.0.0 * @author WPFactory */ @@ -1198,11 +1198,19 @@ function alg_product_publish_date( $atts ) { * Get the product's weight. * * @return string - * @version 1.0.0 + * @version 2.7.18 * @since 1.0.0 */ function alg_product_weight( $atts ) { - return ( $this->the_product->has_weight() ) ? $this->the_product->get_weight() : ''; + $weight = ''; + if( $this->the_product->has_weight() ) { + $weight = $this->the_product->get_weight(); + } + + if ( 0 != $atts['multiply_by'] && is_numeric( $atts['multiply_by'] ) && is_numeric( $weight ) ) { + $weight = $weight * $atts['multiply_by']; + } + return $weight; } /** diff --git a/langs/product-xml-feeds-for-woocommerce.pot b/langs/product-xml-feeds-for-woocommerce.pot index 40db8ad..255ede5 100644 --- a/langs/product-xml-feeds-for-woocommerce.pot +++ b/langs/product-xml-feeds-for-woocommerce.pot @@ -2,14 +2,14 @@ # This file is distributed under the GNU General Public License v3.0. msgid "" msgstr "" -"Project-Id-Version: product-xml-feeds-for-woocommerce 2.7.17\n" +"Project-Id-Version: product-xml-feeds-for-woocommerce 2.7.18\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/product-xml-feeds-for-woocommerce\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-05-28T14:49:32+02:00\n" +"POT-Creation-Date: 2024-06-03T17:40:05+02:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.9.0\n" "X-Domain: product-xml-feeds-for-woocommerce\n" diff --git a/product-xml-feeds-for-woocommerce.php b/product-xml-feeds-for-woocommerce.php index bd02b88..61ae680 100644 --- a/product-xml-feeds-for-woocommerce.php +++ b/product-xml-feeds-for-woocommerce.php @@ -3,7 +3,7 @@ Plugin Name: Product XML Feeds for WooCommerce Plugin URI: https://wpfactory.com/item/product-xml-feeds-woocommerce/ Description: Create your own XML files using tens of preconfigured shortcodes for you on your WooCommerce store -Version: 2.7.17 +Version: 2.7.18 Author: WPFactory Author URI: https://wpfactory.com Text Domain: product-xml-feeds-for-woocommerce @@ -53,7 +53,7 @@ final class Alg_WC_Product_XML_Feeds { * @var string * @since 1.0.0 */ - public $version = '2.7.17'; + public $version = '2.7.18'; /** * @var Alg_WC_Product_XML_Feeds The single instance of the class diff --git a/readme.txt b/readme.txt index e9012ef..ce8fed6 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmu Tags: woocommerce, product xml feeds, xml, export Requires at least: 4.4 Tested up to: 6.5 -Stable tag: 2.7.17 +Stable tag: 2.7.18 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -158,6 +158,9 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S == Changelog == += 2.7.18 - 03/06/2024 = +* Update [alg_product_weight] multiply_by + = 2.7.17 - 28/05/2024 = * WC tested up to: 8.9 * Add - new shortcode [alg_wc_product_category_hierar_list]