Changeset 2469231
- Timestamp:
- 02/05/2021 01:00:29 AM (5 years ago)
- Location:
- enhanced-ajax-add-to-cart-for-woocommerce
- Files:
-
- 83 added
- 3 edited
-
tags/2.1.3 (added)
-
tags/2.1.3/LICENSE.txt (added)
-
tags/2.1.3/README.txt (added)
-
tags/2.1.3/assets (added)
-
tags/2.1.3/assets/css (added)
-
tags/2.1.3/assets/css/enhanced-ajax-add-to-cart-wc-public.css (added)
-
tags/2.1.3/assets/js (added)
-
tags/2.1.3/assets/js/enhanced-ajax-add-to-cart-wc-public.js (added)
-
tags/2.1.3/blocks (added)
-
tags/2.1.3/blocks/a2cp (added)
-
tags/2.1.3/blocks/a2cp/block.js (added)
-
tags/2.1.3/blocks/a2cp/editor.css (added)
-
tags/2.1.3/blocks/a2cp/index.js (added)
-
tags/2.1.3/blocks/a2cp/style.css (added)
-
tags/2.1.3/blocks/common (added)
-
tags/2.1.3/blocks/common/a2c-control.js (added)
-
tags/2.1.3/blocks/common/api (added)
-
tags/2.1.3/blocks/common/api/index.js (added)
-
tags/2.1.3/blocks/common/api/request.js (added)
-
tags/2.1.3/blocks/common/formatting (added)
-
tags/2.1.3/blocks/common/formatting/errors.js (added)
-
tags/2.1.3/blocks/common/formatting/html.js (added)
-
tags/2.1.3/blocks/common/formatting/price.js (added)
-
tags/2.1.3/blocks/common/formatting/title.js (added)
-
tags/2.1.3/blocks/common/hierarchy.js (added)
-
tags/2.1.3/blocks/common/icons (added)
-
tags/2.1.3/blocks/common/icons/back.js (added)
-
tags/2.1.3/blocks/common/icons/checkbox-checked.js (added)
-
tags/2.1.3/blocks/common/icons/checkbox-unchecked.js (added)
-
tags/2.1.3/blocks/common/icons/index.js (added)
-
tags/2.1.3/blocks/common/icons/radio-selected.js (added)
-
tags/2.1.3/blocks/common/icons/radio-unselected.js (added)
-
tags/2.1.3/blocks/common/product-control (added)
-
tags/2.1.3/blocks/common/product-control/index.js (added)
-
tags/2.1.3/blocks/common/product-control/search-list-control.js (added)
-
tags/2.1.3/blocks/common/product-control/search-list-item.js (added)
-
tags/2.1.3/blocks/common/product-control/state (added)
-
tags/2.1.3/blocks/common/product-control/state/actions.js (added)
-
tags/2.1.3/blocks/common/product-control/state/actions.test.js (added)
-
tags/2.1.3/blocks/common/product-control/state/reducer.js (added)
-
tags/2.1.3/blocks/common/product-control/state/reducer.test.js (added)
-
tags/2.1.3/blocks/common/product-control/view.js (added)
-
tags/2.1.3/blocks/common/search-control.js (added)
-
tags/2.1.3/blocks/common/search-product-util.js (added)
-
tags/2.1.3/blocks/common/search-product-variation-util.js (added)
-
tags/2.1.3/blocks/common/search-variation-control.js (added)
-
tags/2.1.3/blocks/common/tag.js (added)
-
tags/2.1.3/blocks/common/utils (added)
-
tags/2.1.3/blocks/common/utils/local-api-middleware.js (added)
-
tags/2.1.3/blocks/common/utils/local-storage-polyfill.js (added)
-
tags/2.1.3/blocks/common/utils/local-storage.js (added)
-
tags/2.1.3/blocks/common/utils/parse-json.js (added)
-
tags/2.1.3/dist (added)
-
tags/2.1.3/dist/blocks (added)
-
tags/2.1.3/dist/blocks/a2cp.asset.php (added)
-
tags/2.1.3/dist/blocks/a2cp.js (added)
-
tags/2.1.3/dist/request (added)
-
tags/2.1.3/dist/request/a2c-submit.asset.php (added)
-
tags/2.1.3/dist/request/a2c-submit.js (added)
-
tags/2.1.3/enhanced-ajax-add-to-cart-wc.php (added)
-
tags/2.1.3/index.php (added)
-
tags/2.1.3/languages (added)
-
tags/2.1.3/languages/enhanced-ajax-add-to-cart-wc.po (added)
-
tags/2.1.3/languages/enhanced-ajax-add-to-cart-wc.pot (added)
-
tags/2.1.3/src (added)
-
tags/2.1.3/src/abstract-eaa2c-button.php (added)
-
tags/2.1.3/src/class-eaa2c-activator.php (added)
-
tags/2.1.3/src/class-eaa2c-admin.php (added)
-
tags/2.1.3/src/class-eaa2c-ajax.php (added)
-
tags/2.1.3/src/class-eaa2c-deactivator.php (added)
-
tags/2.1.3/src/class-eaa2c-i18n.php (added)
-
tags/2.1.3/src/class-eaa2c-loader.php (added)
-
tags/2.1.3/src/class-eaa2c-public.php (added)
-
tags/2.1.3/src/class-eaa2c-settings.php (added)
-
tags/2.1.3/src/class-eaa2c-single.php (added)
-
tags/2.1.3/src/class-enhanced-ajax-add-to-cart-wc.php (added)
-
tags/2.1.3/src/index.php (added)
-
tags/2.1.3/src/legacy (added)
-
tags/2.1.3/src/legacy/shortcode.php (added)
-
tags/2.1.3/uninstall.php (added)
-
tags/2.1.3/woo-includes (added)
-
tags/2.1.3/woo-includes/class-eaa2cwc-dependencies.php (added)
-
tags/2.1.3/woo-includes/woo-functions.php (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/enhanced-ajax-add-to-cart-wc.php (modified) (3 diffs)
-
trunk/src/abstract-eaa2c-button.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
enhanced-ajax-add-to-cart-for-woocommerce/trunk/README.txt
r2463053 r2469231 205 205 206 206 == Changelog == 207 208 = 2.1.3 = 209 * Fixed: Extra checks during Attribute Title generation had namespacing failure. 207 210 208 211 = 2.1.2 = -
enhanced-ajax-add-to-cart-for-woocommerce/trunk/enhanced-ajax-add-to-cart-wc.php
r2463053 r2469231 12 12 * Plugin URI: https://www.theritesites.com/plugins/enhanced-ajax-add-to-cart-wc 13 13 * 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. 214 * Version: 2.1.3 15 15 * Author: TheRiteSites 16 16 * Author URI: https://www.theritesites.com … … 19 19 * Text Domain: enhanced-ajax-add-to-cart-wc 20 20 * Domain Path: /languages 21 * WC tested up to: 4.921 * WC tested up to: 5.0 22 22 * WC requires at least: 3.0 23 23 */ … … 35 35 * Current plugin version. 36 36 */ 37 defined( 'ENHANCED_AJAX_ADD_TO_CART' ) || define( 'ENHANCED_AJAX_ADD_TO_CART', '2.1. 2' );37 defined( 'ENHANCED_AJAX_ADD_TO_CART' ) || define( 'ENHANCED_AJAX_ADD_TO_CART', '2.1.3' ); 38 38 defined( 'EAA2C_PLUGIN_FILE' ) || define( 'EAA2C_PLUGIN_FILE', __FILE__ ); 39 39 -
enhanced-ajax-add-to-cart-for-woocommerce/trunk/src/abstract-eaa2c-button.php
r2463053 r2469231 83 83 public function get_att_title( $product_variation = null ) { 84 84 $att_title = array(); 85 if ( $product_variation instanceof WC_Product) {85 if ( $product_variation instanceof \WC_Product ) { 86 86 foreach ( $product_variation->get_attributes() as $key => $attribute ) { 87 87 $termTitle = $attribute; … … 96 96 } elseif ( is_string( $termTitle ) ) { 97 97 $att_title[] = $termTitle; 98 } elseif ( is_array( $termTitle ) ) { 99 $att_title[] = implode( ', ', $termTitle ); 98 100 } else { 99 101 if ( EAA2C_DEBUG ) { … … 111 113 $att_title = implode( ', ', $att_title ); 112 114 return $att_title; 115 116 // $titleDisplay = $product->get_name(); 117 // if ( ! is_null( $variation ) && $variation !== false ) { 118 119 // $att_title = array(); 120 // foreach ( $variation->get_attributes() as $key => $attribute ) { 121 // $termTitle = $attribute; 122 // if ( taxonomy_exists( $key ) ) { 123 // $term = get_term_by( 'slug', $attribute, $key ); 124 // if ( ! is_wp_error( $term ) && ! empty( $term->name ) ) { 125 // $termTitle = $term->name; 126 // } 127 // } 128 // $att_title[] = $termTitle; 129 // } 130 // $att_title = implode( ', ', $att_title ); 131 132 // if ( strcmp( $titleType, 'full' ) === 0 ) { 133 // // In this scenario, we need to add the attribute title to the "full" title. 134 // // This is due to the fact that product and variation are provided, and the 135 // // above $product->get_name() only gets the "base" name 136 // if ( ! empty( $att_title ) ) { 137 // $titleDisplay .= ' - ' . $att_title; 138 // } 139 // } 140 // elseif ( strcmp( $titleType, 'att' ) === 0 ) { 141 // $titleDisplay = array(); 142 // if ( $variation instanceof \WC_Product ) { 143 // $titleDisplay = $att_title; 144 // } 145 // } 146 // } else { 147 // $att_title = array(); 148 // foreach ( $product->get_attributes() as $key => $attribute ) { 149 // // For product specific attributes, there is no "taxonomy" - treat it as default 150 // $termTitle = $attribute; 151 // if ( taxonomy_exists( $key ) ) { 152 // // For global attributes, we need to do some magic to get the title 153 // $term = get_term_by( 'slug', $attribute, $key ); 154 // if ( ! is_wp_error( $term ) && ! empty( $term->name ) ) { 155 // $termTitle = $term->name; 156 // } 157 // } 158 // $att_title[] = $termTitle; 159 // } 160 // $att_title = implode( ', ', $att_title ); 161 // if ( strcmp( $titleType, 'base' ) === 0 ) { 162 // // In this scenario, we need to remove the attribute title from the "full" title. 163 // // This is due to the fact that ponly the product is provided, and the 164 // // above $product->get_name() gets the "full" name 165 // $titleDisplay = $product->get_title(); 166 // } 167 // elseif ( strcmp( $titleType, 'att' ) === 0 ) { 168 // $titleDisplay = $att_title; 169 // } 170 // } 113 171 } 114 172 … … 211 269 212 270 $priceDisplay = wc_price( $product->get_price() ); 213 if ( $contentVisibility[ ' button' ] === true ) {271 if ( $contentVisibility[ 'title' ] === true ) { 214 272 $titleDisplay = $product->get_name(); 215 273 if ( ! is_null( $variation ) && $variation !== false ) {
Note: See TracChangeset
for help on using the changeset viewer.