Plugin Directory

Changeset 1487562


Ignore:
Timestamp:
08/31/2016 08:11:27 PM (10 years ago)
Author:
layotte
Message:

Tagging 1.35.10

Location:
ithemes-exchange
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ithemes-exchange/tags/1.35.10/api/sales.php

    r1337460 r1487562  
    6464
    6565        $sale_price = it_exchange_get_product_feature( $product_id, 'sale-price' );
    66         $sale_price = it_exchange_format_price( $sale_price );
     66
     67        if ( empty( $sale_price ) || $sale_price === 0.00 ) {
     68            $sale_price = __( 'Free', 'it-l10n-ithemes-exchange' );
     69        } else {
     70            $sale_price = it_exchange_format_price( $sale_price );
     71        }
    6772
    6873        remove_filter( 'it_exchange_api_theme_product_base_price', 'it_exchange_add_sale_information_to_base_price_theme', 20 );
  • ithemes-exchange/tags/1.35.10/api/theme/product.php

    r1460445 r1487562  
    944944    function superwidget( $options=array() ) {
    945945
    946         $show = true;
    947 
    948         global $wp_registered_widgets;
    949 
    950         $sidebars = wp_get_sidebars_widgets();
    951 
    952         foreach ( $sidebars as $widgets ) {
    953             foreach ( $widgets as $widget ) {
    954 
    955                 if ( strpos( $widget, 'it-exchange-super-widget' ) !== false ) {
    956                     $show = false;
    957 
    958                     break 2;
    959                 }
    960             }
    961         }
    962 
    963946        // Return boolean if has flag was set. Just keeping this here since its in all other product.php methods
    964947        if ( $options['supports'] ) {
    965             return $show;
     948            return true;
    966949        }
    967950
    968951        // Return boolean if has flag was set
    969952        if ( $options['has'] ) {
    970             return $show;
    971         }
    972 
    973         if ( ! $show ) {
    974             return '';
     953            return true;
    975954        }
    976955
  • ithemes-exchange/tags/1.35.10/history.txt

    r1460445 r1487562  
    12991299    Tweak: Don't autoload transient transactions
    13001300    Tweak: Update lib/classes
     13011.35.10 - Elise Alley, Timothy Jacobs
     1302    Fix: Issue with the Super Widget not rendering correctly
     1303    Tweak: Add support for sale price to make a product free
  • ithemes-exchange/tags/1.35.10/init.php

    r1460445 r1487562  
    22/*
    33 * Plugin Name: iThemes Exchange
    4  * Version: 1.35.9
     4 * Version: 1.35.10
    55 * Text Domain: it-l10n-ithemes-exchange
    66 * Description: Easily sell your digital goods with iThemes Exchange, simple ecommerce for WordPress
     
    2525class IT_Exchange {
    2626
    27     var $_version         = '1.35.9';
     27    var $_version         = '1.35.10';
    2828    var $_wp_minimum      = '3.5';
    2929    var $_slug            = 'ithemes-exchange';
  • ithemes-exchange/tags/1.35.10/lang/ithemes-exchange.pot

    r1460445 r1487562  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: iThemes Exchange 1.35.9\n"
     5"Project-Id-Version: iThemes Exchange 1.35.10\n"
    66"Report-Msgid-Bugs-To: http://ithemes.com/support/\n"
    7 "POT-Creation-Date: 2016-07-25 19:19:43+00:00\n"
     7"POT-Creation-Date: 2016-08-31 15:10:37+00:00\n"
    88"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
    99"MIME-Version: 1.0\n"
     
    25082508#: api/misc.php:367
    25092509msgid "Please complete all purchase requirements before checkout out."
     2510msgstr ""
     2511
     2512#: api/sales.php:68 api/theme/product.php:211
     2513#: lib/product-features/class.sale-price.php:226
     2514msgid "Free"
    25102515msgstr ""
    25112516
     
    27002705msgstr ""
    27012706
    2702 #: api/theme/product.php:211
    2703 msgid "Free"
    2704 msgstr ""
    2705 
    27062707#: api/theme/product.php:264
    27072708msgid "(more info)"
    27082709msgstr ""
    27092710
    2710 #: api/theme/product.php:861 api/theme/product.php:1014
     2711#: api/theme/product.php:861 api/theme/product.php:993
    27112712#: lib/admin/views/admin-get-more-addons.php:71
    27122713msgid "Buy Now"
    27132714msgstr ""
    27142715
    2715 #: api/theme/product.php:868 api/theme/product.php:1084
     2716#: api/theme/product.php:868 api/theme/product.php:1063
    27162717msgid "Add to Cart"
    27172718msgstr ""
     
    27252726msgstr ""
    27262727
    2727 #: api/theme/product.php:1017 api/theme/product.php:1087
     2728#: api/theme/product.php:996 api/theme/product.php:1066
    27282729msgid "Out of stock."
    27292730msgstr ""
    27302731
    2731 #: api/theme/product.php:1018 api/theme/product.php:1088
     2732#: api/theme/product.php:997 api/theme/product.php:1067
    27322733msgid "Product not available right now."
    27332734msgstr ""
    27342735
    2735 #: api/theme/product.php:1090
     2736#: api/theme/product.php:1069
    27362737msgid "Max Quantity Reached"
    27372738msgstr ""
     
    28832884msgstr ""
    28842885
    2885 #. #-#-#-#-#  ithemes-exchange.pot (iThemes Exchange 1.35.9)  #-#-#-#-#
     2886#. #-#-#-#-#  ithemes-exchange.pot (iThemes Exchange 1.35.10)  #-#-#-#-#
    28862887#. Plugin Name of the plugin/theme
    28872888#: core-addons/admin/basic-reporting/init.php:21
     
    72537254msgstr ""
    72547255
    7255 #: lib/super-widget/class.super-widget.php:48
     7256#: lib/super-widget/class.super-widget.php:58
    72567257msgid "iThemes Exchange Super Widget"
    72577258msgstr ""
    72587259
    7259 #: lib/super-widget/class.super-widget.php:50
     7260#: lib/super-widget/class.super-widget.php:60
    72607261msgid ""
    72617262"Handles Buy Now, Add to Cart, Cart Summary, Registration, Log in, and "
     
    72637264msgstr ""
    72647265
    7265 #: lib/super-widget/class.super-widget.php:189
     7266#: lib/super-widget/class.super-widget.php:217
    72667267msgid "Processing"
    72677268msgstr ""
    72687269
    7269 #: lib/super-widget/class.super-widget.php:190
     7270#: lib/super-widget/class.super-widget.php:218
    72707271msgid "Processing... "
    72717272msgstr ""
    72727273
    7273 #: lib/super-widget/class.super-widget.php:242
     7274#: lib/super-widget/class.super-widget.php:272
    72747275msgid "There are no options for this widget."
    72757276msgstr ""
  • ithemes-exchange/tags/1.35.10/lib/admin/js/add-edit-product.js

    r1349143 r1487562  
    766766    $( '#sale-price' ).on( 'focusout', function() {
    767767
    768         if ( $(this).val() == '0.00' || $(this).val() == '' ) {
     768        if ( ! $(this).val().length ) {
    769769            return;
    770770        }
  • ithemes-exchange/tags/1.35.10/lib/product-features/class.sale-price.php

    r1304261 r1487562  
    4646        $sale_price = it_exchange_get_product_feature( $product->ID, $this->slug );
    4747
    48         if ( empty( $sale_price ) || $sale_price == '0.00' ) {
     48        if ( ! $product->has_feature( $this->slug ) ) {
    4949            $sale_price = '';
    5050        } else {
     
    6363        ?>
    6464        <label for="sale-price"><?php esc_html_e( $description ); ?></label>
    65         <input type="text" placeholder="<?php esc_attr_e( it_exchange_format_price( 0 ) ); ?>"
     65        <input type="text" placeholder=""
    6666               id="sale-price" name="it-exchange-sale-price" value="<?php esc_attr_e( $sale_price ); ?>" tabindex="3"
    6767               data-symbol="<?php esc_attr_e( $currency ); ?>" data-symbol-position="<?php esc_attr_e( $settings['currency-symbol-position'] ); ?>"
     
    100100        }
    101101
    102         if ( ! empty( $_POST['it-exchange-sale-price'] ) ) {
     102        if ( isset( $_POST['it-exchange-sale-price'] ) ) {
    103103            $new_price = $_POST['it-exchange-sale-price'];
    104104        } else {
    105             $new_price = 0;
     105            $new_price = '';
    106106        }
    107107
     
    128128        $options = ITUtility::merge_defaults( $options, $defaults );
    129129
    130         if ( $options['setting'] == 'sale-price' ) {
     130        if ( $options['setting'] === 'sale-price' ) {
     131
     132            if ( $new_value === '' ) {
     133                return delete_post_meta( $product_id, '_it_exchange_sale_price' );
     134            }
    131135
    132136            $new_value = it_exchange_convert_to_database_number( $new_value );
    133137
    134             if ( empty( $new_value ) ) {
    135                 return delete_post_meta( $product_id, '_it_exchange_sale_price' );
    136             } else {
    137                 return update_post_meta( $product_id, '_it_exchange_sale_price', $new_value );
    138             }
     138            return update_post_meta( $product_id, '_it_exchange_sale_price', $new_value );
    139139        }
    140140
     
    162162
    163163        if ( $options['setting'] == 'sale-price' ) {
    164             return it_exchange_convert_from_database_number( get_post_meta( $product_id, '_it_exchange_sale_price', true ) );
     164            return (float) it_exchange_convert_from_database_number( get_post_meta( $product_id, '_it_exchange_sale_price', true ) );
    165165        }
    166166
     
    180180     */
    181181    public function product_has_feature( $result, $product_id, $options = array() ) {
    182         $price     = it_exchange_get_product_feature( $product_id, $this->slug );
    183         $db_number = (int) it_exchange_convert_to_database_number( $price );
    184 
    185         return ! empty( $db_number );
     182        return metadata_exists( 'post', $product_id, '_it_exchange_sale_price' );
    186183    }
    187184
     
    226223
    227224            if ( $format ) {
    228                 $base_price = it_exchange_format_price( $base_price );
     225                if ( empty( $base_price ) ) {
     226                    $base_price = __( 'Free', 'it-l10n-ithemes-exchange' );
     227                } else {
     228                    $base_price = it_exchange_format_price( $base_price );
     229                }
    229230            }
    230231        }
  • ithemes-exchange/tags/1.35.10/lib/super-widget/class.super-widget.php

    r1349143 r1487562  
    4040
    4141    /**
     42     * @var bool
     43     */
     44    private $in_sidebar = false;
     45
     46    /**
     47     * @var bool
     48     */
     49    private $rendered = false;
     50
     51    /**
    4252     * Constructor: Init
    4353     *
     
    5969            add_action( 'template_redirect', array( $this, 'set_state' ), 11 );
    6070            add_action( 'dynamic_sidebar_before', array( $this, 'maybe_remove_sw_from_sidebar' ) );
     71            add_action( 'dynamic_sidebar_after', array( $this, 'mark_out_of_sidebar' ) );
    6172        }
    6273    }
     
    111122         */
    112123        $args = apply_filters( 'it_exchange_super_widget_args', $args, $product_id );
     124
     125        if ( $this->rendered ) {
     126
     127            if ( ! $this->in_sidebar ) {
     128                return;
     129            }
     130
     131            $might_remove  = false;
     132            $remove_others = true;
     133        } else {
     134            $remove_others = false;
     135            $might_remove  = true;
     136        }
    113137
    114138        // Some JS we're going to need
     
    124148            jQuery(function () {
    125149
     150                <?php if ( $remove_others ) : ?>
     151                    jQuery('.it-exchange-super-widget[data-might-remove="1"]').remove();
     152                <?php endif; ?>
     153
    126154                <?php $shipping_addons = it_exchange_get_enabled_addons( array( 'category' => 'shipping' ) ); if ( ! empty( $shipping_addons) ) : ?>
    127155                // Shipping Init country/state fields
     
    152180        echo $args['before_widget'];
    153181        ?>
    154         <div class="it-exchange-super-widget it-exchange-super-widget-<?php esc_attr_e( $this->get_state() ); ?>">
     182        <div class="it-exchange-super-widget it-exchange-super-widget-<?php esc_attr_e( $this->get_state() ); ?>" data-might-remove="<?php echo $might_remove; ?>">
    155183            <style type="text/css">
    156184                .it-exchange-super-widget .spinner {
     
    210238            unset( $GLOBALS['it_exchange']['in_superwidget'] );
    211239        }
     240
     241        $this->rendered = true;
    212242    }
    213243
     
    397427    public function maybe_remove_sw_from_sidebar( $index ) {
    398428
     429        $this->in_sidebar = true;
     430
    399431        if ( IT_Exchange_SW_Shortcode::has_shortcode() && ! ( is_archive() || is_home() ) ) {
    400432
     
    416448            }
    417449        }
     450    }
     451
     452    /**
     453     * Mark that we are no longer in the sidebar.
     454     *
     455     * @since 1.36.0
     456     */
     457    public function mark_out_of_sidebar() {
     458        $this->in_sidebar = false;
    418459    }
    419460}
  • ithemes-exchange/tags/1.35.10/readme.txt

    r1460445 r1487562  
    44Requires at least: 3.7
    55Tested up to: 4.6
    6 Stable tag: 1.35.9
     6Stable tag: 1.35.10
    77License: GPLv2 or later
    88
     
    8888
    8989== Changelog ==
     90
     91= 1.35.10 =
     92* Fix: Issue with the Super Widget not rendering correctly
     93* Tweak: Add support for sale price to make a product free
    9094
    9195= 1.35.9 =
  • ithemes-exchange/trunk/api/sales.php

    r1337460 r1487562  
    6464
    6565        $sale_price = it_exchange_get_product_feature( $product_id, 'sale-price' );
    66         $sale_price = it_exchange_format_price( $sale_price );
     66
     67        if ( empty( $sale_price ) || $sale_price === 0.00 ) {
     68            $sale_price = __( 'Free', 'it-l10n-ithemes-exchange' );
     69        } else {
     70            $sale_price = it_exchange_format_price( $sale_price );
     71        }
    6772
    6873        remove_filter( 'it_exchange_api_theme_product_base_price', 'it_exchange_add_sale_information_to_base_price_theme', 20 );
  • ithemes-exchange/trunk/api/theme/product.php

    r1460445 r1487562  
    944944    function superwidget( $options=array() ) {
    945945
    946         $show = true;
    947 
    948         global $wp_registered_widgets;
    949 
    950         $sidebars = wp_get_sidebars_widgets();
    951 
    952         foreach ( $sidebars as $widgets ) {
    953             foreach ( $widgets as $widget ) {
    954 
    955                 if ( strpos( $widget, 'it-exchange-super-widget' ) !== false ) {
    956                     $show = false;
    957 
    958                     break 2;
    959                 }
    960             }
    961         }
    962 
    963946        // Return boolean if has flag was set. Just keeping this here since its in all other product.php methods
    964947        if ( $options['supports'] ) {
    965             return $show;
     948            return true;
    966949        }
    967950
    968951        // Return boolean if has flag was set
    969952        if ( $options['has'] ) {
    970             return $show;
    971         }
    972 
    973         if ( ! $show ) {
    974             return '';
     953            return true;
    975954        }
    976955
  • ithemes-exchange/trunk/history.txt

    r1460445 r1487562  
    12991299    Tweak: Don't autoload transient transactions
    13001300    Tweak: Update lib/classes
     13011.35.10 - Elise Alley, Timothy Jacobs
     1302    Fix: Issue with the Super Widget not rendering correctly
     1303    Tweak: Add support for sale price to make a product free
  • ithemes-exchange/trunk/init.php

    r1460445 r1487562  
    22/*
    33 * Plugin Name: iThemes Exchange
    4  * Version: 1.35.9
     4 * Version: 1.35.10
    55 * Text Domain: it-l10n-ithemes-exchange
    66 * Description: Easily sell your digital goods with iThemes Exchange, simple ecommerce for WordPress
     
    2525class IT_Exchange {
    2626
    27     var $_version         = '1.35.9';
     27    var $_version         = '1.35.10';
    2828    var $_wp_minimum      = '3.5';
    2929    var $_slug            = 'ithemes-exchange';
  • ithemes-exchange/trunk/lang/ithemes-exchange.pot

    r1460445 r1487562  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: iThemes Exchange 1.35.9\n"
     5"Project-Id-Version: iThemes Exchange 1.35.10\n"
    66"Report-Msgid-Bugs-To: http://ithemes.com/support/\n"
    7 "POT-Creation-Date: 2016-07-25 19:19:43+00:00\n"
     7"POT-Creation-Date: 2016-08-31 15:10:37+00:00\n"
    88"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
    99"MIME-Version: 1.0\n"
     
    25082508#: api/misc.php:367
    25092509msgid "Please complete all purchase requirements before checkout out."
     2510msgstr ""
     2511
     2512#: api/sales.php:68 api/theme/product.php:211
     2513#: lib/product-features/class.sale-price.php:226
     2514msgid "Free"
    25102515msgstr ""
    25112516
     
    27002705msgstr ""
    27012706
    2702 #: api/theme/product.php:211
    2703 msgid "Free"
    2704 msgstr ""
    2705 
    27062707#: api/theme/product.php:264
    27072708msgid "(more info)"
    27082709msgstr ""
    27092710
    2710 #: api/theme/product.php:861 api/theme/product.php:1014
     2711#: api/theme/product.php:861 api/theme/product.php:993
    27112712#: lib/admin/views/admin-get-more-addons.php:71
    27122713msgid "Buy Now"
    27132714msgstr ""
    27142715
    2715 #: api/theme/product.php:868 api/theme/product.php:1084
     2716#: api/theme/product.php:868 api/theme/product.php:1063
    27162717msgid "Add to Cart"
    27172718msgstr ""
     
    27252726msgstr ""
    27262727
    2727 #: api/theme/product.php:1017 api/theme/product.php:1087
     2728#: api/theme/product.php:996 api/theme/product.php:1066
    27282729msgid "Out of stock."
    27292730msgstr ""
    27302731
    2731 #: api/theme/product.php:1018 api/theme/product.php:1088
     2732#: api/theme/product.php:997 api/theme/product.php:1067
    27322733msgid "Product not available right now."
    27332734msgstr ""
    27342735
    2735 #: api/theme/product.php:1090
     2736#: api/theme/product.php:1069
    27362737msgid "Max Quantity Reached"
    27372738msgstr ""
     
    28832884msgstr ""
    28842885
    2885 #. #-#-#-#-#  ithemes-exchange.pot (iThemes Exchange 1.35.9)  #-#-#-#-#
     2886#. #-#-#-#-#  ithemes-exchange.pot (iThemes Exchange 1.35.10)  #-#-#-#-#
    28862887#. Plugin Name of the plugin/theme
    28872888#: core-addons/admin/basic-reporting/init.php:21
     
    72537254msgstr ""
    72547255
    7255 #: lib/super-widget/class.super-widget.php:48
     7256#: lib/super-widget/class.super-widget.php:58
    72567257msgid "iThemes Exchange Super Widget"
    72577258msgstr ""
    72587259
    7259 #: lib/super-widget/class.super-widget.php:50
     7260#: lib/super-widget/class.super-widget.php:60
    72607261msgid ""
    72617262"Handles Buy Now, Add to Cart, Cart Summary, Registration, Log in, and "
     
    72637264msgstr ""
    72647265
    7265 #: lib/super-widget/class.super-widget.php:189
     7266#: lib/super-widget/class.super-widget.php:217
    72667267msgid "Processing"
    72677268msgstr ""
    72687269
    7269 #: lib/super-widget/class.super-widget.php:190
     7270#: lib/super-widget/class.super-widget.php:218
    72707271msgid "Processing... "
    72717272msgstr ""
    72727273
    7273 #: lib/super-widget/class.super-widget.php:242
     7274#: lib/super-widget/class.super-widget.php:272
    72747275msgid "There are no options for this widget."
    72757276msgstr ""
  • ithemes-exchange/trunk/lib/admin/js/add-edit-product.js

    r1349143 r1487562  
    766766    $( '#sale-price' ).on( 'focusout', function() {
    767767
    768         if ( $(this).val() == '0.00' || $(this).val() == '' ) {
     768        if ( ! $(this).val().length ) {
    769769            return;
    770770        }
  • ithemes-exchange/trunk/lib/product-features/class.sale-price.php

    r1304261 r1487562  
    4646        $sale_price = it_exchange_get_product_feature( $product->ID, $this->slug );
    4747
    48         if ( empty( $sale_price ) || $sale_price == '0.00' ) {
     48        if ( ! $product->has_feature( $this->slug ) ) {
    4949            $sale_price = '';
    5050        } else {
     
    6363        ?>
    6464        <label for="sale-price"><?php esc_html_e( $description ); ?></label>
    65         <input type="text" placeholder="<?php esc_attr_e( it_exchange_format_price( 0 ) ); ?>"
     65        <input type="text" placeholder=""
    6666               id="sale-price" name="it-exchange-sale-price" value="<?php esc_attr_e( $sale_price ); ?>" tabindex="3"
    6767               data-symbol="<?php esc_attr_e( $currency ); ?>" data-symbol-position="<?php esc_attr_e( $settings['currency-symbol-position'] ); ?>"
     
    100100        }
    101101
    102         if ( ! empty( $_POST['it-exchange-sale-price'] ) ) {
     102        if ( isset( $_POST['it-exchange-sale-price'] ) ) {
    103103            $new_price = $_POST['it-exchange-sale-price'];
    104104        } else {
    105             $new_price = 0;
     105            $new_price = '';
    106106        }
    107107
     
    128128        $options = ITUtility::merge_defaults( $options, $defaults );
    129129
    130         if ( $options['setting'] == 'sale-price' ) {
     130        if ( $options['setting'] === 'sale-price' ) {
     131
     132            if ( $new_value === '' ) {
     133                return delete_post_meta( $product_id, '_it_exchange_sale_price' );
     134            }
    131135
    132136            $new_value = it_exchange_convert_to_database_number( $new_value );
    133137
    134             if ( empty( $new_value ) ) {
    135                 return delete_post_meta( $product_id, '_it_exchange_sale_price' );
    136             } else {
    137                 return update_post_meta( $product_id, '_it_exchange_sale_price', $new_value );
    138             }
     138            return update_post_meta( $product_id, '_it_exchange_sale_price', $new_value );
    139139        }
    140140
     
    162162
    163163        if ( $options['setting'] == 'sale-price' ) {
    164             return it_exchange_convert_from_database_number( get_post_meta( $product_id, '_it_exchange_sale_price', true ) );
     164            return (float) it_exchange_convert_from_database_number( get_post_meta( $product_id, '_it_exchange_sale_price', true ) );
    165165        }
    166166
     
    180180     */
    181181    public function product_has_feature( $result, $product_id, $options = array() ) {
    182         $price     = it_exchange_get_product_feature( $product_id, $this->slug );
    183         $db_number = (int) it_exchange_convert_to_database_number( $price );
    184 
    185         return ! empty( $db_number );
     182        return metadata_exists( 'post', $product_id, '_it_exchange_sale_price' );
    186183    }
    187184
     
    226223
    227224            if ( $format ) {
    228                 $base_price = it_exchange_format_price( $base_price );
     225                if ( empty( $base_price ) ) {
     226                    $base_price = __( 'Free', 'it-l10n-ithemes-exchange' );
     227                } else {
     228                    $base_price = it_exchange_format_price( $base_price );
     229                }
    229230            }
    230231        }
  • ithemes-exchange/trunk/lib/super-widget/class.super-widget.php

    r1349143 r1487562  
    4040
    4141    /**
     42     * @var bool
     43     */
     44    private $in_sidebar = false;
     45
     46    /**
     47     * @var bool
     48     */
     49    private $rendered = false;
     50
     51    /**
    4252     * Constructor: Init
    4353     *
     
    5969            add_action( 'template_redirect', array( $this, 'set_state' ), 11 );
    6070            add_action( 'dynamic_sidebar_before', array( $this, 'maybe_remove_sw_from_sidebar' ) );
     71            add_action( 'dynamic_sidebar_after', array( $this, 'mark_out_of_sidebar' ) );
    6172        }
    6273    }
     
    111122         */
    112123        $args = apply_filters( 'it_exchange_super_widget_args', $args, $product_id );
     124
     125        if ( $this->rendered ) {
     126
     127            if ( ! $this->in_sidebar ) {
     128                return;
     129            }
     130
     131            $might_remove  = false;
     132            $remove_others = true;
     133        } else {
     134            $remove_others = false;
     135            $might_remove  = true;
     136        }
    113137
    114138        // Some JS we're going to need
     
    124148            jQuery(function () {
    125149
     150                <?php if ( $remove_others ) : ?>
     151                    jQuery('.it-exchange-super-widget[data-might-remove="1"]').remove();
     152                <?php endif; ?>
     153
    126154                <?php $shipping_addons = it_exchange_get_enabled_addons( array( 'category' => 'shipping' ) ); if ( ! empty( $shipping_addons) ) : ?>
    127155                // Shipping Init country/state fields
     
    152180        echo $args['before_widget'];
    153181        ?>
    154         <div class="it-exchange-super-widget it-exchange-super-widget-<?php esc_attr_e( $this->get_state() ); ?>">
     182        <div class="it-exchange-super-widget it-exchange-super-widget-<?php esc_attr_e( $this->get_state() ); ?>" data-might-remove="<?php echo $might_remove; ?>">
    155183            <style type="text/css">
    156184                .it-exchange-super-widget .spinner {
     
    210238            unset( $GLOBALS['it_exchange']['in_superwidget'] );
    211239        }
     240
     241        $this->rendered = true;
    212242    }
    213243
     
    397427    public function maybe_remove_sw_from_sidebar( $index ) {
    398428
     429        $this->in_sidebar = true;
     430
    399431        if ( IT_Exchange_SW_Shortcode::has_shortcode() && ! ( is_archive() || is_home() ) ) {
    400432
     
    416448            }
    417449        }
     450    }
     451
     452    /**
     453     * Mark that we are no longer in the sidebar.
     454     *
     455     * @since 1.36.0
     456     */
     457    public function mark_out_of_sidebar() {
     458        $this->in_sidebar = false;
    418459    }
    419460}
  • ithemes-exchange/trunk/readme.txt

    r1460445 r1487562  
    44Requires at least: 3.7
    55Tested up to: 4.6
    6 Stable tag: 1.35.9
     6Stable tag: 1.35.10
    77License: GPLv2 or later
    88
     
    8888
    8989== Changelog ==
     90
     91= 1.35.10 =
     92* Fix: Issue with the Super Widget not rendering correctly
     93* Tweak: Add support for sale price to make a product free
    9094
    9195= 1.35.9 =
Note: See TracChangeset for help on using the changeset viewer.