Showing with 34 additions and 12 deletions.
  1. +5 −0 CHANGELOG.md
  2. +6 −6 composer.lock
  3. +9 −0 inc/admin.php
  4. +2 −2 inc/prices.php
  5. +1 −1 package.json
  6. +9 −1 readme.txt
  7. +2 −2 woocommerce-product-addon.php
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
##### [Version 32.0.8](https://github.com/Codeinwp/woocommerce-product-addon/compare/v32.0.7...v32.0.8) (2023-06-06)

- Fix: group being duplicated
- Fix: negative price not taken into consideration

##### [Version 32.0.7](https://github.com/Codeinwp/woocommerce-product-addon/compare/v32.0.6...v32.0.7) (2023-05-03)

- Harden security
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ function ppom_admin_save_form_meta() {
$show_cart_thumb = 'NA';

$ppom_meta = isset( $_REQUEST['ppom_meta'] ) ? $_REQUEST['ppom_meta'] : $_REQUEST['ppom'];

if ( empty( $ppom_meta ) ) {
$resp = array(
'message' => __( 'No fields found.', 'woocommerce-product-addon' ),
'status' => 'error',
);
wp_send_json( $resp );
}

$product_meta = apply_filters( 'ppom_meta_data_saving', (array) $ppom_meta, $productmeta_id );
$product_meta = ppom_sanitize_array_data( $product_meta );
$product_meta = json_encode( $product_meta );
Expand Down
4 changes: 2 additions & 2 deletions inc/prices.php
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ function ppom_option_price_handle_vat( $option_price, $product ) {
return $option_price;
}

if ( ! is_product() && apply_filters( 'ppom_handle_option_price_vat_in_cart', true ) === true ) {
if ( $option_price >= 0 && ( ! is_product() && apply_filters( 'ppom_handle_option_price_vat_in_cart', true ) === true ) ) {
$vat_type = get_option( 'woocommerce_tax_display_cart' );
$args = [
'price' => $option_price,
Expand All @@ -1503,7 +1503,7 @@ function ppom_option_price_handle_vat( $option_price, $product ) {
}
}

if ( is_product() && apply_filters( 'ppom_handle_option_price_vat_in_product', true ) === true ) {
if ( $option_price >= 0 && ( is_product() && apply_filters( 'ppom_handle_option_price_vat_in_product', true ) === true ) ) {
$vat_type = get_option( 'woocommerce_tax_display_shop' );
$args = [
'price' => $option_price,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woocommerce-product-addon",
"version": "32.0.7",
"version": "32.0.8",
"description": "PPOM for WooCommerce",
"main": "index.js",
"repository": "https://github.com/Codeinwp/woocommerce-product-addon",
Expand Down
10 changes: 9 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: themeisle
Tags: woocommerce product addons, woocommerce product options, woocommerce product fields, woocommerce product, woocommerce product addon
Requires at least: 3.5
Tested up to: 6.2
Stable tag: 32.0.7
Stable tag: 32.0.8
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires PHP: 7.2
Expand Down Expand Up @@ -122,6 +122,14 @@ If you feels that PPOM Free or PPOM PRO versions are not enough for your needs,

== Changelog ==

##### [Version 32.0.8](https://github.com/Codeinwp/woocommerce-product-addon/compare/v32.0.7...v32.0.8) (2023-06-06)

- Fix: group being duplicated
- Fix: negative price not taken into consideration




##### [Version 32.0.7](https://github.com/Codeinwp/woocommerce-product-addon/compare/v32.0.6...v32.0.7) (2023-05-03)

- Harden security
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-product-addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: PPOM for WooCommerce
* Plugin URI: https://themeisle.com/plugins/ppom-pro/
* Description: PPOM (Personalized Product Meta Manager) plugin allow WooCommerce Store Admin to create unlimited input fields and files to attach with Product Pages.
* Version: 32.0.7
* Version: 32.0.8
* Author: Themeisle
* Text Domain: woocommerce-product-addon
* Domain Path: /languages
Expand All @@ -26,7 +26,7 @@
define( 'PPOM_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
define( 'PPOM_WP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __DIR__ ) ) );
define( 'PPOM_BASENAME', basename( PPOM_WP_PLUGIN_DIR ) );
define( 'PPOM_VERSION', '32.0.7' );
define( 'PPOM_VERSION', '32.0.8' );
define( 'PPOM_DB_VERSION', '30.1.0' );
define( 'PPOM_PRODUCT_META_KEY', '_product_meta_id' );
define( 'PPOM_TABLE_META', 'nm_personalized' );
Expand Down