Plugin Directory

Changeset 3194487


Ignore:
Timestamp:
11/21/2024 08:40:58 PM (16 months ago)
Author:
levelfourstorefront
Message:

Committing version 5.7.8, check the change log for more info.

Location:
wp-easycart/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wp-easycart/trunk/admin/inc/wp_easycart_admin.php

    r3182606 r3194487  
    15001500                $prev_order = 0;
    15011501                $is_new_order = false;
     1502                $order_details_ids = array();
    15021503                foreach ( $sales_data as $result ) {
    15031504                    if ( $result['order_id'] != $prev_order ) {
    15041505                        $prev_order = $result['order_id'];
    15051506                        $is_new_order = true;
     1507                        $order_details_ids = array();
    15061508                    }
    15071509
    1508                     $new_line = array();
    1509                     foreach ( $keys as $key ) {
    1510                         if ( ! in_array( $key, $fee_type_keys ) ) {
    1511                             $value = $result[ $key ];
    1512                             if ( in_array( $key, $single_use_key_names ) && ! $is_new_order ) {
    1513                                 $new_line[] = '0.00';
    1514                             } else if ( ! isset( $value ) || '' == $value ) {
    1515                                 $new_line[] = '';
    1516                             } else {
    1517                                 $new_line[] = $value;
    1518                             }
    1519                         }
    1520                     }
    1521 
    1522                     if ( $is_new_order ) {
    1523                         if ( $fee_types && is_array( $fee_types ) && count( $fee_types ) > 0 ) {
    1524                             $order_fee_list = $this->wpdb->get_results( $this->wpdb->prepare( 'SELECT * FROM ec_order_fee WHERE order_id = %d ORDER BY fee_label ASC', (int) $result['order_id'] ) );
    1525                             foreach ( $fee_types as $fee_type ) {
    1526                                 $is_fee_type_found = false;
    1527                                 if ( $order_fee_list && is_array( $order_fee_list ) ) {
    1528                                     foreach ( $order_fee_list as $order_fee_item ) {
    1529                                         if ( $order_fee_item->fee_label == $fee_type->fee_label ) {
    1530                                             $new_line[] = $order_fee_item->fee_total;
    1531                                             $is_fee_type_found = true;
    1532                                         }
    1533                                     }
    1534                                 }
    1535                                 if ( ! $is_fee_type_found ) {
    1536                                     $new_line[] = '0.000';
     1510                    if ( ! in_array( $result['orderdetail_id'], $order_details_ids ) ) {
     1511                        $order_details_ids[] = $result['orderdetail_id'];
     1512
     1513                        $new_line = array();
     1514                        foreach ( $keys as $key ) {
     1515                            if ( ! in_array( $key, $fee_type_keys ) ) {
     1516                                $value = $result[ $key ];
     1517                                if ( in_array( $key, $single_use_key_names ) && ! $is_new_order ) {
     1518                                    $new_line[] = '0.00';
     1519                                } else if ( ! isset( $value ) || '' == $value ) {
     1520                                    $new_line[] = '';
     1521                                } else {
     1522                                    $new_line[] = $value;
    15371523                                }
    15381524                            }
    15391525                        }
     1526
     1527                        if ( $is_new_order ) {
     1528                            if ( $fee_types && is_array( $fee_types ) && count( $fee_types ) > 0 ) {
     1529                                $order_fee_list = $this->wpdb->get_results( $this->wpdb->prepare( 'SELECT * FROM ec_order_fee WHERE order_id = %d ORDER BY fee_label ASC', (int) $result['order_id'] ) );
     1530                                foreach ( $fee_types as $fee_type ) {
     1531                                    $is_fee_type_found = false;
     1532                                    if ( $order_fee_list && is_array( $order_fee_list ) ) {
     1533                                        foreach ( $order_fee_list as $order_fee_item ) {
     1534                                            if ( $order_fee_item->fee_label == $fee_type->fee_label ) {
     1535                                                $new_line[] = $order_fee_item->fee_total;
     1536                                                $is_fee_type_found = true;
     1537                                            }
     1538                                        }
     1539                                    }
     1540                                    if ( ! $is_fee_type_found ) {
     1541                                        $new_line[] = '0.000';
     1542                                    }
     1543                                }
     1544                            }
     1545                        }
     1546
     1547                        fputcsv( $file, $new_line );
     1548                        $is_new_order = false;
    15401549                    }
    1541 
    1542                     fputcsv( $file, $new_line );
    1543                     $is_new_order = false;
    15441550                }
    15451551                fclose( $file );
  • wp-easycart/trunk/design/layout/base-responsive-v3/ec_product.php

    r3188139 r3194487  
    389389                    <?php }?>
    390390
    391                     <h1 class="ec_product_quickview_content_title"><a href="<?php echo esc_attr( $product->get_product_link( ) ); ?>"><?php echo wp_easycart_escape_html( $product->title ); ?></a></h1>
     391                    <h2 class="ec_product_quickview_content_title"><a href="<?php echo esc_attr( $product->get_product_link( ) ); ?>"><?php echo wp_easycart_escape_html( $product->title ); ?></a></h2>
    392392                    <div class="ec_product_quickview_content_divider"></div>
    393393                    <?php if( $product->login_for_pricing && !$product->is_login_for_pricing_valid( ) ){
     
    590590    </div>
    591591</div>
    592 <script>
    593 jQuery( document.getElementById( "ec_product_quickview_container_<?php echo esc_attr( $product->model_number ); ?>" ) ).appendTo( document.body );
    594 </script>
    595592<?php }  ?>
    596 
    597593
    598594<?php ///// Admin editor /// ?>
  • wp-easycart/trunk/design/theme/base-responsive-v3/ec-store.js

    r3188139 r3194487  
    11// JavaScript Document
    22jQuery( document ).ready( function( ){
     3    if ( jQuery( '#wpeasycart_cart_holder' ).length ) {
     4        wpeasycart_load_cart( jQuery( '#wpeasycart_cart_holder' ).data( 'cart-page' ), jQuery( '#wpeasycart_cart_holder' ).data( 'success-code' ), jQuery( '#wpeasycart_cart_holder' ).data( 'error-code' ), jQuery( '#wpeasycart_cart_holder' ).data( 'language' ), jQuery( '#wpeasycart_cart_holder' ).data( 'nonce' ) )
     5    }
     6    if ( jQuery( '#wpeasycart_account_holder' ).length ) {
     7        wpeasycart_load_account( jQuery( '#wpeasycart_account_holder' ).data( 'account-page' ), jQuery( '#wpeasycart_account_holder' ).data( 'page-id' ), jQuery( '#wpeasycart_account_holder' ).data( 'success-code' ), jQuery( '#wpeasycart_account_holder' ).data( 'error-code' ), jQuery( '#wpeasycart_account_holder' ).data( 'language' ), jQuery( '#wpeasycart_account_holder' ).data( 'nonce' ) )
     8    }
     9    if ( jQuery( '.ec_product_quickview_container' ).length ) {
     10        jQuery( '.ec_product_quickview_container' ).each( function() {
     11            jQuery( this ).appendTo( document.body );
     12        } );
     13    }
    314    if ( jQuery( '.ec_add_to_cart_form, input[type="number"].ec_quantity' ).length ) {
    415        jQuery( '.ec_add_to_cart_form, input[type="number"].ec_quantity' ).on( 'keypress', function( e ) {
  • wp-easycart/trunk/design/theme/base-responsive-v3/ec-store.min.js

    r3188139 r3194487  
    1 jQuery(document).ready(function(){if(jQuery('.ec_add_to_cart_form, input[type="number"].ec_quantity').length){jQuery('.ec_add_to_cart_form, input[type="number"].ec_quantity').on('keypress',function(e){if(!jQuery(e.target).is('textarea')&&e.which==13){return!1}})}
     1jQuery(document).ready(function(){if(jQuery('#wpeasycart_cart_holder').length){wpeasycart_load_cart(jQuery('#wpeasycart_cart_holder').data('cart-page'),jQuery('#wpeasycart_cart_holder').data('success-code'),jQuery('#wpeasycart_cart_holder').data('error-code'),jQuery('#wpeasycart_cart_holder').data('language'),jQuery('#wpeasycart_cart_holder').data('nonce'))}
     2if(jQuery('#wpeasycart_account_holder').length){wpeasycart_load_account(jQuery('#wpeasycart_account_holder').data('account-page'),jQuery('#wpeasycart_account_holder').data('page-id'),jQuery('#wpeasycart_account_holder').data('success-code'),jQuery('#wpeasycart_account_holder').data('error-code'),jQuery('#wpeasycart_account_holder').data('language'),jQuery('#wpeasycart_account_holder').data('nonce'))}
     3if(jQuery('.ec_product_quickview_container').length){jQuery('.ec_product_quickview_container').each(function(){jQuery(this).appendTo(document.body)})}
     4if(jQuery('.ec_add_to_cart_form, input[type="number"].ec_quantity').length){jQuery('.ec_add_to_cart_form, input[type="number"].ec_quantity').on('keypress',function(e){if(!jQuery(e.target).is('textarea')&&e.which==13){return!1}})}
    25jQuery('.ec_flipbook_left').click(function(event){var current_image=jQuery(event.target).parent().find('img.ec_flipbook_image').attr('src');var image_list_string=jQuery(event.target).parent().data('image-list');var image_list=image_list_string.split(',').filter(item=>item!=='');var prev=image_list[image_list.length-1];for(var i=0;i<image_list.length;i++){if(image_list[i]==current_image){break}else{prev=image_list[i]}}
    36jQuery(event.target).parent().find('img.ec_flipbook_image').attr('src',prev)});jQuery('.ec_flipbook_right').click(function(event){var current_image=jQuery(event.target).parent().find('img.ec_flipbook_image').attr('src');var image_list_string=jQuery(event.target).parent().data('image-list');var image_list=image_list_string.split(',').filter(item=>item!=='');var prev=image_list[0];for(var i=image_list.length-1;i>-1;i--){if(image_list[i]==current_image){break}else{prev=image_list[i]}}
  • wp-easycart/trunk/inc/classes/store/ec_storepage.php

    r3084202 r3194487  
    256256            if ( get_option( 'ec_option_google_ga4_tag_manager' ) ) {
    257257                echo '<script>
    258                 jQuery( document ).ready( function() {
     258                document.addEventListener( \'DOMContentLoaded\', function() {
    259259                    dataLayer.push({ ecommerce: null });
    260260                    dataLayer.push({
     
    281281            } else {
    282282                echo '<script>
    283                 jQuery( document ).ready( function() {
     283                document.addEventListener( \'DOMContentLoaded\', function() {
    284284                    gtag( "event", "view_item_list", {
    285285                            item_list_id: "products",
     
    335335            if ( get_option( 'ec_option_google_ga4_tag_manager' ) ) {
    336336                echo '<script>
    337                 jQuery( document ).ready( function() {
     337                document.addEventListener( \'DOMContentLoaded\', function() {
    338338                    dataLayer.push( { ecommerce: null } );
    339339                    dataLayer.push( {
     
    356356            } else {
    357357                echo '<script>
    358                 jQuery( document ).ready( function() {
     358                document.addEventListener( \'DOMContentLoaded\', function() {
    359359                    gtag( "event", "view_item", {
    360360                        currency: "' . esc_attr( $GLOBALS['currency']->get_currency_code( ) ) . '",
  • wp-easycart/trunk/readme.txt

    r3188139 r3194487  
    33Tags: shopping cart, ecommerce, e-commerce, store, paypal, stripe, square, facebook, apple pay
    44Tested up to: 6.7
    5 Stable tag: 5.7.7
     5Stable tag: 5.7.8
    66License: WP EasyCart License
    77License URI: http://www.wpeasycart.com/terms-and-conditions/
     
    215215
    216216== Changelog ==
     217= 5.7.8 =
     218* New Feature - Order status updates, text notifications, now allow for extra dynamic content. View the docs for details.
     219* Bug Fix - Fixed our caching error prevention system to work when jquery is loaded deferred.
     220* Bug Fix - Quickview added h1 tags to your page.
     221* Bug Fix - Restrict access feature needed to account for value 0, not just empty string.
    217222= 5.7.7 =
    218223* New Feature - Option item images now allow for a default image. Defaults may be left blank to continue with the first image being automatically selected.
  • wp-easycart/trunk/wpeasycart.php

    r3188139 r3194487  
    55 * Description: The WordPress Shopping Cart by WP EasyCart is a simple eCommerce solution that installs into new or existing WordPress blogs. Customers purchase directly from your store! Get a full ecommerce platform in WordPress! Sell products, downloadable goods, gift cards, clothing and more! Now with WordPress, the powerful features are still very easy to administrate! If you have any questions, please view our website at <a href="http://www.wpeasycart.com" target="_blank">WP EasyCart</a>.
    66
    7  * Version: 5.7.7
     7 * Version: 5.7.8
    88 * Author: WP EasyCart
    99 * Author URI: http://www.wpeasycart.com
     
    1414 *
    1515 * @package wpeasycart
    16  * @version 5.7.7
     16 * @version 5.7.8
    1717 * @author WP EasyCart <[email protected]>
    1818 * @copyright Copyright (c) 2012, WP EasyCart
     
    2323define( 'EC_PLUGIN_DIRECTORY', __DIR__ );
    2424define( 'EC_PLUGIN_DATA_DIRECTORY', __DIR__ . '-data' );
    25 define( 'EC_CURRENT_VERSION', '5_7_7' );
     25define( 'EC_CURRENT_VERSION', '5_7_8' );
    2626define( 'EC_CURRENT_DB', '1_30' );/* Backwards Compatibility */
    2727define( 'EC_UPGRADE_DB', '93' );
     
    14931493        }
    14941494    }
     1495    $cart_page .= ( ( isset( $_GET['order_id'] ) ) ? '-' . (int) $_GET['order_id'] : '' );
     1496    $cart_page .= ( ( isset( $_GET['PID'] ) && sanitize_text_field( $_GET['PID'] ) != '' ) ? '-paypal-' . preg_replace( "/[^A-Za-z0-9\-]/", '', sanitize_text_field( $_GET['PID'] ) ) . '-' . preg_replace( "/[^A-Za-z0-9\-]/", '', sanitize_text_field( $_GET['PYID'] ) ) : '' );
     1497    $cart_page .= ( ( isset( $_GET['OID'] ) && sanitize_text_field( $_GET['OID'] ) != '' ) ? '-paypal-' . preg_replace( "/[^A-Z0-9]/", '', sanitize_text_field( $_GET['OID'] ) ) . '-' . preg_replace( "/[^A-Z0-9]/", '', sanitize_text_field( $_GET['PYID'] ) ) : '' );
     1498    $cart_page .= ( ( $cart_page == 5 ) ? '-sub-' . esc_attr( $product_id ) : '' );
    14951499    $error_codes = apply_filters( 'wpeasycart_valid_cart_errors', array( "email_exists", "login_failed", "3dsecure_failed", "manualbill_failed", "thirdparty_failed", "payment_failed", "card_error", "already_subscribed", "not_activated", "subscription_not_found", "user_insert_error", "subscription_added_failed", "subscription_failed", "invalid_address", "session_expired", "invalid_vat_number", "stock_invalid", "ideal-pending", "shipping_method", "invalid_cart_shipping" ) );
    1496     echo '<div id="wpeasycart_cart_holder" style="position:relative; width:100%; min-height:350px;"><style>
     1500    echo '<div id="wpeasycart_cart_holder" style="position:relative; width:100%; min-height:350px;" data-cart-page="' . esc_js( $cart_page ) . '" data-success-code="' . ( ( isset( $_GET['ec_cart_success'] ) && sanitize_text_field( $_GET['ec_cart_success'] ) == 'account_created' ) ? 'account_created' : '' ) . '" data-error-code="' . ( ( isset( $_GET['ec_cart_error'] ) && in_array( $_GET['ec_cart_error'], $error_codes ) ) ? esc_js( sanitize_text_field( $_GET['ec_cart_error'] ) ) : '' ) . '" data-language="' . esc_attr( sanitize_text_field( $language ) ) . '" data-nonce="' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-cart-page' ) ) . '"><style>
    14971501    @keyframes rotation{
    14981502        0% { transform:rotate(0deg); }
     
    15041508            <div style="height: 30px; width: 30px; display: inline-block; box-sizing: content-box; opacity: 1; filter: alpha(opacity=100); -webkit-animation: rotation .7s infinite linear; -moz-animation: rotation .7s infinite linear; -o-animation: rotation .7s infinite linear; animation: rotation .7s infinite linear; border-left: 8px solid rgba(0, 0, 0, .2); border-right: 8px solid rgba(0, 0, 0, .2); border-bottom: 8px solid rgba(0, 0, 0, .2); border-top: 8px solid #fff; border-radius: 100%;"></div>
    15051509        </div>
    1506     </div></div><script type="text/javascript">jQuery( document ).ready( function() { wpeasycart_load_cart( \'' . esc_js( $cart_page ) . ( ( isset( $_GET['order_id'] ) ) ? '-' . (int) $_GET['order_id'] : '' ) . ( ( isset( $_GET['PID'] ) && sanitize_text_field( $_GET['PID'] ) != '' ) ? '-paypal-' . esc_js( preg_replace( "/[^A-Za-z0-9\-]/", '', sanitize_text_field( $_GET['PID'] ) ) ) . '-' . esc_js( preg_replace( "/[^A-Za-z0-9\-]/", '', sanitize_text_field( $_GET['PYID'] ) ) ) : '' ) . ( ( isset( $_GET['OID'] ) && sanitize_text_field( $_GET['OID'] ) != '' ) ? '-paypal-' . esc_js( preg_replace( "/[^A-Z0-9]/", '', sanitize_text_field( $_GET['OID'] ) ) ) . '-' . esc_js( preg_replace( "/[^A-Z0-9]/", '', sanitize_text_field( $_GET['PYID'] ) ) ) : '' ) . ( ( $cart_page == 5 ) ? '-sub-' . esc_attr( $product_id ) : '' ) . '\', \'' . ( ( isset( $_GET['ec_cart_success'] ) && sanitize_text_field( $_GET['ec_cart_success'] ) == 'account_created' ) ? 'account_created' : '' ) . '\', \'' . ( ( isset( $_GET['ec_cart_error'] ) && in_array( $_GET['ec_cart_error'], $error_codes ) ) ? esc_js( sanitize_text_field( $_GET['ec_cart_error'] ) ) : '' ) . '\', \'' . esc_attr( sanitize_text_field( $language ) ). '\', \'' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-cart-page' ) ) .'\' ); } );</script>';
     1510    </div></div>';
    15071511}
    15081512
     
    15931597        $account_page = sanitize_key( $_GET['ec_page'] );
    15941598    }
    1595     echo '<div id="wpeasycart_account_holder" style="position:relative; width:100%; min-height:350px;"><style>
     1599    if ( $account_page == 'order_details' && isset( $_GET['order_id'] ) && isset( $_GET['ec_guest_key'] ) ) {
     1600        $account_page .= '-' . (int) $_GET['order_id'] . '-' . substr( preg_replace( '/[^A-Z]/', '', sanitize_text_field( $_GET['ec_guest_key'] ) ), 0, 30 );
     1601    } else if ( $account_page == 'order_details' && isset( $_GET['order_id'] ) ) {
     1602        $account_page .= '-' . (int) $_GET['order_id'];
     1603    } else if ( $account_page == 'subscription_details' && isset( $_GET['subscription_id'] ) ) {
     1604        $account_page .= '-' . (int) $_GET['subscription_id'];
     1605    }
     1606    $valid_success_codes = array( 'login_success', 'validation_required', 'reset_email_sent', 'personal_information_updated', 'billing_information_updated', 'billing_information_updated', 'shipping_information_updated', 'shipping_information_updated', 'subscription_updated', 'subscription_updated', 'subscription_canceled', 'cart_account_created', 'activation_success', 'password_updated' );
     1607    $valid_error_codes = array( 'register_email_error', 'not_activated', 'login_failed', 'register_email_error', 'register_invalid', 'no_reset_email_found', 'personal_information_update_error', 'password_no_match', 'password_wrong_current', 'billing_information_error', 'shipping_information_error', 'subscription_update_failed', 'subscription_cancel_failed' );
     1608    $success_code = ( isset( $_GET['account_success'] ) && in_array( $_GET['account_success'], $valid_success_codes ) ) ? sanitize_text_field( $_GET['account_success'] ) : '';
     1609    $error_code = ( isset( $_GET['account_error'] ) && in_array( $_GET['account_error'], $valid_error_codes ) ) ? sanitize_text_field( $_GET['account_error'] ) : '';
     1610    echo '<div id="wpeasycart_account_holder" style="position:relative; width:100%; min-height:350px;" data-account-page="' . esc_js( $account_page ) . '" data-page-id="' . esc_js( get_queried_object_id() ) . '" data-success-code="' . esc_js( $success_code ) . '" data-error-code="' . esc_js( $error_code ) . '" data-language="' . esc_attr( sanitize_text_field( $language ) ) . '" data-nonce="' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-account-page' ) ) . '"><style>
    15961611    @keyframes rotation{
    15971612        0% { transform:rotate(0deg); }
     
    16031618            <div style="height: 30px; width: 30px; display: inline-block; box-sizing: content-box; opacity: 1; filter: alpha(opacity=100); -webkit-animation: rotation .7s infinite linear; -moz-animation: rotation .7s infinite linear; -o-animation: rotation .7s infinite linear; animation: rotation .7s infinite linear; border-left: 8px solid rgba(0, 0, 0, .2); border-right: 8px solid rgba(0, 0, 0, .2); border-bottom: 8px solid rgba(0, 0, 0, .2); border-top: 8px solid #fff; border-radius: 100%;"></div>
    16041619        </div>
    1605     </div></div><script type="text/javascript">jQuery( document ).ready( function() { ';
    1606     $valid_success_codes = array( 'login_success', 'validation_required', 'reset_email_sent', 'personal_information_updated', 'billing_information_updated', 'billing_information_updated', 'shipping_information_updated', 'shipping_information_updated', 'subscription_updated', 'subscription_updated', 'subscription_canceled', 'cart_account_created', 'activation_success', 'password_updated' );
    1607     $valid_error_codes = array( 'register_email_error', 'not_activated', 'login_failed', 'register_email_error', 'register_invalid', 'no_reset_email_found', 'personal_information_update_error', 'password_no_match', 'password_wrong_current', 'billing_information_error', 'shipping_information_error', 'subscription_update_failed', 'subscription_cancel_failed' );
    1608     $success_code = ( isset( $_GET['account_success'] ) && in_array( $_GET['account_success'], $valid_success_codes ) ) ? sanitize_text_field( $_GET['account_success'] ) : '';
    1609     $error_code = ( isset( $_GET['account_error'] ) && in_array( $_GET['account_error'], $valid_error_codes ) ) ? sanitize_text_field( $_GET['account_error'] ) : '';
    1610     if ( $account_page == 'order_details' && isset( $_GET['order_id'] ) && isset( $_GET['ec_guest_key'] ) ) {
    1611         echo 'wpeasycart_load_account( \'' . esc_js( $account_page ) . '-' . (int) $_GET['order_id'] . '-' . esc_js( substr( preg_replace( '/[^A-Z]/', '', sanitize_text_field( $_GET['ec_guest_key'] ) ), 0, 30 ) ) . '\', ' . esc_js( get_queried_object_id() ) . ', \'' . esc_js( $success_code ) . '\', \'' . esc_js( $error_code ) . '\', \'' . esc_attr( sanitize_text_field( $language ) ). '\', \'' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-account-page' ) ) .'\' ); } );';
    1612 
    1613     } else if ( $account_page == 'order_details' && isset( $_GET['order_id'] ) ) {
    1614         echo 'wpeasycart_load_account( \'' . esc_js( $account_page ) . '-' . (int) $_GET['order_id']. '\', ' . esc_js( get_queried_object_id() ) . ', \'' . esc_js( $success_code ) . '\', \'' . esc_js( $error_code ) . '\', \'' . esc_attr( sanitize_text_field( $language ) ). '\', \'' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-account-page' ) ) .'\' ); } );';
    1615 
    1616     } else if ( $account_page == 'subscription_details' && isset( $_GET['subscription_id'] ) ) {
    1617         echo 'wpeasycart_load_account( \'' . esc_js( $account_page ) . '-' . (int) $_GET['subscription_id'] . '\', ' . esc_js( get_queried_object_id() ) . ', \'' . esc_js( $success_code ) . '\', \'' . esc_js( $error_code ) . '\', \'' . esc_attr( sanitize_text_field( $language ) ). '\', \'' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-account-page' ) ) .'\' ); } );';
    1618 
    1619     } else {
    1620         echo 'wpeasycart_load_account( \'' . esc_js( $account_page ) . '\', ' . esc_js( get_queried_object_id() ) . ', \'' . esc_js( $success_code ) . '\', \'' . esc_js( $error_code ) . '\', \'' . esc_attr( sanitize_text_field( $language ) ). '\', \'' . esc_attr( wp_create_nonce( 'wp-easycart-get-dynamic-account-page' ) ) .'\' ); } );';
    1621 
    1622     }
    1623     echo '</script>';
     1620    </div></div>';
    16241621}
    16251622
     
    87438740    if ( is_array( $product_restrict ) ) {
    87448741        for ( $i=0; $i<count( $product_restrict ); $i++ ) {
    8745             if ( $product_restrict[$i] != '' ) {
     8742            if ( $product_restrict[$i] != '' && $product_restrict[$i] != '0' ) {
    87468743                $is_product_restricted = true;
    87478744            }
     
    87508747    if ( is_array( $user_restrict ) ) {
    87518748        for ( $i=0; $i<count( $user_restrict ); $i++ ) {
    8752             if ( $user_restrict[$i] != '' ) {
     8749            if ( $user_restrict[$i] != '' && $user_restrict[$i] != '0' ) {
    87538750                $is_user_restricted = true;
    87548751            }
     
    87578754    if ( is_array( $role_restrict ) ) {
    87588755        for ( $i=0; $i<count( $role_restrict ); $i++ ) {
    8759             if ( $role_restrict[$i] != '' ) {
     8756            if ( $role_restrict[$i] != '' && $role_restrict[$i] != '0' ) {
    87608757                $is_role_restricted = true;
    87618758            }
Note: See TracChangeset for help on using the changeset viewer.