Changeset 3194487
- Timestamp:
- 11/21/2024 08:40:58 PM (16 months ago)
- Location:
- wp-easycart/trunk
- Files:
-
- 7 edited
-
admin/inc/wp_easycart_admin.php (modified) (1 diff)
-
design/layout/base-responsive-v3/ec_product.php (modified) (2 diffs)
-
design/theme/base-responsive-v3/ec-store.js (modified) (1 diff)
-
design/theme/base-responsive-v3/ec-store.min.js (modified) (1 diff)
-
inc/classes/store/ec_storepage.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
wpeasycart.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-easycart/trunk/admin/inc/wp_easycart_admin.php
r3182606 r3194487 1500 1500 $prev_order = 0; 1501 1501 $is_new_order = false; 1502 $order_details_ids = array(); 1502 1503 foreach ( $sales_data as $result ) { 1503 1504 if ( $result['order_id'] != $prev_order ) { 1504 1505 $prev_order = $result['order_id']; 1505 1506 $is_new_order = true; 1507 $order_details_ids = array(); 1506 1508 } 1507 1509 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; 1537 1523 } 1538 1524 } 1539 1525 } 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; 1540 1549 } 1541 1542 fputcsv( $file, $new_line );1543 $is_new_order = false;1544 1550 } 1545 1551 fclose( $file ); -
wp-easycart/trunk/design/layout/base-responsive-v3/ec_product.php
r3188139 r3194487 389 389 <?php }?> 390 390 391 <h 1 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> 392 392 <div class="ec_product_quickview_content_divider"></div> 393 393 <?php if( $product->login_for_pricing && !$product->is_login_for_pricing_valid( ) ){ … … 590 590 </div> 591 591 </div> 592 <script>593 jQuery( document.getElementById( "ec_product_quickview_container_<?php echo esc_attr( $product->model_number ); ?>" ) ).appendTo( document.body );594 </script>595 592 <?php } ?> 596 597 593 598 594 <?php ///// Admin editor /// ?> -
wp-easycart/trunk/design/theme/base-responsive-v3/ec-store.js
r3188139 r3194487 1 1 // JavaScript Document 2 2 jQuery( 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 } 3 14 if ( jQuery( '.ec_add_to_cart_form, input[type="number"].ec_quantity' ).length ) { 4 15 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}})} 1 jQuery(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'))} 2 if(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'))} 3 if(jQuery('.ec_product_quickview_container').length){jQuery('.ec_product_quickview_container').each(function(){jQuery(this).appendTo(document.body)})} 4 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}})} 2 5 jQuery('.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]}} 3 6 jQuery(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 256 256 if ( get_option( 'ec_option_google_ga4_tag_manager' ) ) { 257 257 echo '<script> 258 jQuery( document ).ready(function() {258 document.addEventListener( \'DOMContentLoaded\', function() { 259 259 dataLayer.push({ ecommerce: null }); 260 260 dataLayer.push({ … … 281 281 } else { 282 282 echo '<script> 283 jQuery( document ).ready(function() {283 document.addEventListener( \'DOMContentLoaded\', function() { 284 284 gtag( "event", "view_item_list", { 285 285 item_list_id: "products", … … 335 335 if ( get_option( 'ec_option_google_ga4_tag_manager' ) ) { 336 336 echo '<script> 337 jQuery( document ).ready(function() {337 document.addEventListener( \'DOMContentLoaded\', function() { 338 338 dataLayer.push( { ecommerce: null } ); 339 339 dataLayer.push( { … … 356 356 } else { 357 357 echo '<script> 358 jQuery( document ).ready(function() {358 document.addEventListener( \'DOMContentLoaded\', function() { 359 359 gtag( "event", "view_item", { 360 360 currency: "' . esc_attr( $GLOBALS['currency']->get_currency_code( ) ) . '", -
wp-easycart/trunk/readme.txt
r3188139 r3194487 3 3 Tags: shopping cart, ecommerce, e-commerce, store, paypal, stripe, square, facebook, apple pay 4 4 Tested up to: 6.7 5 Stable tag: 5.7. 75 Stable tag: 5.7.8 6 6 License: WP EasyCart License 7 7 License URI: http://www.wpeasycart.com/terms-and-conditions/ … … 215 215 216 216 == 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. 217 222 = 5.7.7 = 218 223 * 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 5 5 * 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>. 6 6 7 * Version: 5.7. 77 * Version: 5.7.8 8 8 * Author: WP EasyCart 9 9 * Author URI: http://www.wpeasycart.com … … 14 14 * 15 15 * @package wpeasycart 16 * @version 5.7. 716 * @version 5.7.8 17 17 * @author WP EasyCart <[email protected]> 18 18 * @copyright Copyright (c) 2012, WP EasyCart … … 23 23 define( 'EC_PLUGIN_DIRECTORY', __DIR__ ); 24 24 define( 'EC_PLUGIN_DATA_DIRECTORY', __DIR__ . '-data' ); 25 define( 'EC_CURRENT_VERSION', '5_7_ 7' );25 define( 'EC_CURRENT_VERSION', '5_7_8' ); 26 26 define( 'EC_CURRENT_DB', '1_30' );/* Backwards Compatibility */ 27 27 define( 'EC_UPGRADE_DB', '93' ); … … 1493 1493 } 1494 1494 } 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 ) : '' ); 1495 1499 $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> 1497 1501 @keyframes rotation{ 1498 1502 0% { transform:rotate(0deg); } … … 1504 1508 <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> 1505 1509 </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>'; 1507 1511 } 1508 1512 … … 1593 1597 $account_page = sanitize_key( $_GET['ec_page'] ); 1594 1598 } 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> 1596 1611 @keyframes rotation{ 1597 1612 0% { transform:rotate(0deg); } … … 1603 1618 <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> 1604 1619 </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>'; 1624 1621 } 1625 1622 … … 8743 8740 if ( is_array( $product_restrict ) ) { 8744 8741 for ( $i=0; $i<count( $product_restrict ); $i++ ) { 8745 if ( $product_restrict[$i] != '' ) {8742 if ( $product_restrict[$i] != '' && $product_restrict[$i] != '0' ) { 8746 8743 $is_product_restricted = true; 8747 8744 } … … 8750 8747 if ( is_array( $user_restrict ) ) { 8751 8748 for ( $i=0; $i<count( $user_restrict ); $i++ ) { 8752 if ( $user_restrict[$i] != '' ) {8749 if ( $user_restrict[$i] != '' && $user_restrict[$i] != '0' ) { 8753 8750 $is_user_restricted = true; 8754 8751 } … … 8757 8754 if ( is_array( $role_restrict ) ) { 8758 8755 for ( $i=0; $i<count( $role_restrict ); $i++ ) { 8759 if ( $role_restrict[$i] != '' ) {8756 if ( $role_restrict[$i] != '' && $role_restrict[$i] != '0' ) { 8760 8757 $is_role_restricted = true; 8761 8758 }
Note: See TracChangeset
for help on using the changeset viewer.