Plugin Directory

Changeset 2469860


Ignore:
Timestamp:
02/05/2021 11:16:38 PM (5 years ago)
Author:
theritesites
Message:

2.1.4 - variable product price display bug

Location:
enhanced-ajax-add-to-cart-for-woocommerce
Files:
83 added
3 edited

Legend:

Unmodified
Added
Removed
  • enhanced-ajax-add-to-cart-for-woocommerce/trunk/README.txt

    r2469231 r2469860  
    205205
    206206== Changelog ==
     207
     208= 2.1.4 =
     209* Fixed: When title not displayed, would show lowest available price for variable products, even when variation specified.
    207210
    208211= 2.1.3 =
  • enhanced-ajax-add-to-cart-for-woocommerce/trunk/enhanced-ajax-add-to-cart-wc.php

    r2469231 r2469860  
    1212 * Plugin URI:        https://www.theritesites.com/plugins/enhanced-ajax-add-to-cart-wc
    1313 * Description:       Creates a shortcode or block for you to be able to add an AJAX button with an associated quantity for you WooCommerce Product
    14  * Version:           2.1.3
     14 * Version:           2.1.4
    1515 * Author:            TheRiteSites
    1616 * Author URI:        https://www.theritesites.com
     
    3535 * Current plugin version.
    3636 */
    37 defined( 'ENHANCED_AJAX_ADD_TO_CART' ) || define( 'ENHANCED_AJAX_ADD_TO_CART', '2.1.3' );
     37defined( 'ENHANCED_AJAX_ADD_TO_CART' ) || define( 'ENHANCED_AJAX_ADD_TO_CART', '2.1.4' );
    3838defined( 'EAA2C_PLUGIN_FILE' ) || define( 'EAA2C_PLUGIN_FILE', __FILE__ );
    3939
  • enhanced-ajax-add-to-cart-for-woocommerce/trunk/src/abstract-eaa2c-button.php

    r2469231 r2469860  
    268268                        }
    269269
    270                         $priceDisplay = wc_price( $product->get_price() );
     270                        if ( $contentVisibility[ 'price' ] === true ) {
     271                            $priceDisplay = wc_price( $product->get_price() );
     272                            if ( ! is_null( $variation ) && $variation !== false ) {
     273                                // TODO This price display needs to come out and be according to the content visibility of the price.
     274                                $priceDisplay = wc_price( $variation->get_price() );
     275                            }
     276                        }
     277
    271278                        if ( $contentVisibility[ 'title' ] === true ) {
    272279                            $titleDisplay = $product->get_name();
    273280                            if ( ! is_null( $variation ) && $variation !== false ) {
    274                                 $priceDisplay = wc_price( $variation->get_price() );
    275281
    276282                                if ( strcmp( $titleType, 'full' ) === 0 ) {
Note: See TracChangeset for help on using the changeset viewer.