Plugin Directory

Changeset 3235251


Ignore:
Timestamp:
02/05/2025 09:31:05 AM (13 months ago)
Author:
triopsi
Message:

New Version 1.7.11

Location:
extra-product-data-for-woocommerce/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extra-product-data-for-woocommerce/trunk/CHANGELOG.md

    r3224913 r3235251  
     1## [1.7.10](https://git.triopsi.dev/triopsi/extra-product-data-for-woocommerce/compare/v1.7.9...v1.7.10) (2025-01-18)
     2
     3
     4### Bug Fixes
     5
     6* calculate with empty fields ([bc91deb](https://git.triopsi.dev/triopsi/extra-product-data-for-woocommerce/commit/bc91deb53a38c24fea63bdda9f1b81f701d8bf7a))
     7
    18## [1.7.9](https://git.triopsi.dev/triopsi/extra-product-data-for-woocommerce/compare/v1.7.8...v1.7.9) (2025-01-13)
    29
  • extra-product-data-for-woocommerce/trunk/extra-product-data-for-woocommerce.php

    r3224913 r3235251  
    33Plugin Name: Extra Product Data for WooCommerce
    44Description: Adds customizable input fields per product in WooCommerce, allowing users to enter extra details on the frontend.
    5 Version: 1.7.10
     5Version: 1.7.11
    66Author: Triopsi
    77Author URI: https://triopsi.dev
  • extra-product-data-for-woocommerce/trunk/readme.txt

    r3224913 r3235251  
    55Tested up to: 6.7
    66Requires PHP: 8.2
    7 Stable tag: 1.7.10
     7Stable tag: 1.7.11
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    148148= 1.7.9 (13.01.2025) =
    149149* Bug fix: css fix on user edit page
     150
     151= 1.7.10 (18.01.2025) =
     152* Bug fix: calculate with empty fields
     153
     154= 1.7.11 (05.02.2025) =
     155* Bug fix: the product can only be purchased once
  • extra-product-data-for-woocommerce/trunk/src/classes/class-exprdawc-product-page-fronted.php

    r3224913 r3235251  
    270270            return $passed;
    271271        }
     272
    272273        $custom_fields = $product->get_meta( '_extra_product_fields', true );
    273274
    274275        if ( ! empty( $custom_fields ) ) {
     276
     277            // Check if the product can only be purchased once.
     278            if ( $product->get_sold_individually() ) {
     279                foreach ( WC()->cart->get_cart() as $cart_item ) {
     280                    if ( $cart_item['product_id'] == $product_id ) {
     281                        wc_add_notice( __( 'This product can only be purchased once.', 'extra-product-data-for-woocommerce' ), 'error' );
     282                        return false;
     283                    }
     284                }
     285            }
    275286            foreach ( $custom_fields as $index_num => $input_field_array ) {
    276287
  • extra-product-data-for-woocommerce/trunk/src/constants.php

    r3224913 r3235251  
    3030
    3131// Useful global constants.
    32 $version = '1.7.10';
     32$version = '1.7.11';
    3333define( 'EXPRDAWC_VERSION', $version );
    3434define( 'EXPRDAWC_PLUGIN_MAIN_FILE', 'extra-product-data-for-woocommerce.php' );
Note: See TracChangeset for help on using the changeset viewer.