Changeset 3147152
- Timestamp:
- 09/05/2024 03:15:27 PM (19 months ago)
- Location:
- cocart-get-cart-enhanced
- Files:
-
- 12 edited
- 1 copied
-
tags/4.0.5 (copied) (copied from cocart-get-cart-enhanced/trunk)
-
tags/4.0.5/cocart-get-cart-enhanced.php (modified) (2 diffs)
-
tags/4.0.5/includes/class-cocart-get-cart-enhanced.php (modified) (1 diff)
-
tags/4.0.5/includes/filters/filter-v2.php (modified) (7 diffs)
-
tags/4.0.5/languages/cocart-get-cart-enhanced.pot (modified) (2 diffs)
-
tags/4.0.5/load-package.php (modified) (1 diff)
-
tags/4.0.5/readme.txt (modified) (2 diffs)
-
trunk/cocart-get-cart-enhanced.php (modified) (2 diffs)
-
trunk/includes/class-cocart-get-cart-enhanced.php (modified) (1 diff)
-
trunk/includes/filters/filter-v2.php (modified) (7 diffs)
-
trunk/languages/cocart-get-cart-enhanced.pot (modified) (2 diffs)
-
trunk/load-package.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cocart-get-cart-enhanced/tags/4.0.5/cocart-get-cart-enhanced.php
r3131183 r3147152 6 6 * Author: CoCart Headless, LLC 7 7 * Author URI: https://cocartapi.com 8 * Version: 4.0. 48 * Version: 4.0.5 9 9 * Text Domain: cocart-get-cart-enhanced 10 10 * Domain Path: /languages/ … … 13 13 * Requires Plugins: cart-rest-api-for-woocommerce 14 14 * CoCart requires at least: 4.2 15 * CoCart tested up to: 4. 315 * CoCart tested up to: 4.4 16 16 * 17 17 * @package CoCart Cart API Enhanced -
cocart-get-cart-enhanced/tags/4.0.5/includes/class-cocart-get-cart-enhanced.php
r3131183 r3147152 29 29 * @var string 30 30 */ 31 public static $version = '4.0. 4';31 public static $version = '4.0.5'; 32 32 33 33 /** -
cocart-get-cart-enhanced/tags/4.0.5/includes/filters/filter-v2.php
r3084216 r3147152 6 6 * @package Filters 7 7 * @since 3.0.0 8 * @version 4.0. 28 * @version 4.0.5 9 9 * @license GPL-2.0+ 10 10 */ … … 33 33 * 34 34 * @since 3.0.0 Introduced. 35 * @since 4.0.0 Added parent ID for a variation. 36 * @since 4.0.0 Added visible product attributes for all products that is not a variation product. 35 * @since 4.0.0 Added parent ID for a variation and visible product attributes for all products that is not a variation product. 37 36 * 38 37 * @param array $cart_contents Cart contents before modifications. 39 38 * @param int $item_key Unique identifier for item in cart. 40 39 * @param array $cart_item Item details. 41 * @param object $ _productProduct data.40 * @param object $product Product data. 42 41 * 43 42 * @return array $cart_contents Cart contents after modifications. 44 43 */ 45 public function return_product_details( $cart_contents, $item_key, $cart_item, $ _product ) {44 public function return_product_details( $cart_contents, $item_key, $cart_item, $product ) { 46 45 // Additional meta. 47 46 if ( isset( $cart_contents[ $item_key ]['meta'] ) ) { 48 47 if ( ! empty( $cart_contents[ $item_key ]['meta']['variation'] ) ) { 49 $cart_contents[ $item_key ]['meta']['variation']['parent_id'] = $ _product->get_parent_id();48 $cart_contents[ $item_key ]['meta']['variation']['parent_id'] = $product->get_parent_id(); 50 49 } 51 $cart_contents[ $item_key ]['meta']['attributes'] = function_exists( 'cocart_format_attribute_data' ) ? cocart_format_attribute_data( $ _product ) : array();52 $cart_contents[ $item_key ]['meta']['virtual'] = $ _product->get_virtual();53 $cart_contents[ $item_key ]['meta']['downloadable'] = $ _product->get_downloadable();50 $cart_contents[ $item_key ]['meta']['attributes'] = function_exists( 'cocart_format_attribute_data' ) ? cocart_format_attribute_data( $product ) : array(); 51 $cart_contents[ $item_key ]['meta']['virtual'] = $product->get_virtual(); 52 $cart_contents[ $item_key ]['meta']['downloadable'] = $product->get_downloadable(); 54 53 } 55 54 56 55 // Categories and Tags. 57 $cart_contents[ $item_key ]['categories'] = get_the_terms( $ _product->get_id(), 'product_cat' );58 $cart_contents[ $item_key ]['tags'] = get_the_terms( $ _product->get_id(), 'product_tag' );56 $cart_contents[ $item_key ]['categories'] = get_the_terms( $product->get_id(), 'product_cat' ); 57 $cart_contents[ $item_key ]['tags'] = get_the_terms( $product->get_id(), 'product_tag' ); 59 58 60 59 // Product stock status. 61 $status = $ _product->get_stock_status();60 $status = $product->get_stock_status(); 62 61 $color = '#a46497'; 63 62 … … 78 77 $cart_contents[ $item_key ]['stock_status'] = array( 79 78 'status' => $status, 80 'stock_quantity' => $ _product->get_stock_quantity(),79 'stock_quantity' => $product->get_stock_quantity(), 81 80 'hex_color' => $color, 82 81 ); 83 82 84 83 // Product gallery images. 85 $gallery_ids = $ _product->get_gallery_image_ids();84 $gallery_ids = $product->get_gallery_image_ids(); 86 85 87 86 $cart_contents[ $item_key ]['gallery'] = array(); … … 89 88 if ( ! empty( $gallery_ids ) ) { 90 89 foreach ( $gallery_ids as $image_id ) { 90 /** 91 * Filters the gallery ID for found image. 92 * 93 * @param int $image_id Product thumbnail ID. 94 * @param array $cart_item The cart item data. 95 * @param string $item_key Generated ID based on the product information when added to the cart. 96 */ 91 97 $gallery_id = apply_filters( 'cocart_item_gallery', $image_id, $cart_item, $item_key ); 92 98 93 $gallery_src = wp_get_attachment_image_src( $gallery_id, apply_filters( 'cocart_item_gallery_thumbnail_size', 'woocommerce_thumbnail' ) ); 99 if ( empty( $gallery_id ) ) { 100 continue; 101 } 102 103 $thumbnail_src = wp_get_attachment_image_src( $gallery_id, $this->get_gallery_thumbnail_size() ); 104 $thumbnail_src = ! empty( $thumbnail_src[0] ) ? $thumbnail_src[0] : ''; 94 105 95 106 /** 96 107 * Filters the source of the product gallery image. 97 108 * 98 * @param string $gallery_src URL of the product gallery image. 109 * @param string $thumbnail_src URL of the product thumbnail. 110 * @param array $cart_item The cart item data. 111 * @param string $item_key Generated ID based on the product information when added to the cart. 99 112 */ 100 $gallery_src = apply_filters( 'cocart_item_thumbnail_src', $ gallery_src[0], $cart_item, $item_key, $removed_item);113 $gallery_src = apply_filters( 'cocart_item_thumbnail_src', $thumbnail_src, $cart_item, $item_key ); 101 114 102 $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = $gallery_src;115 $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = esc_url( $gallery_src ); 103 116 } 104 117 } 105 118 106 119 // Permalink of product if visible. 107 if ( version_compare( COCART_VERSION, '5.0.0', ' >=' ) ) {108 $cart_contents[ $item_key ]['permalink'] = $ _product->is_visible() ? $_product->get_permalink( $cart_item ) : '';120 if ( version_compare( COCART_VERSION, '5.0.0', '<' ) ) { 121 $cart_contents[ $item_key ]['permalink'] = $product->is_visible() ? $product->get_permalink( $cart_item ) : ''; 109 122 } else { 110 $cart_contents[ $item_key ]['permalink'] = $ _product->is_visible() ? function_exists( 'cocart_get_permalink' ) ? cocart_get_permalink( get_permalink( $_product->get_id() ) ) : $_product->get_permalink( $cart_item ) : '';123 $cart_contents[ $item_key ]['permalink'] = $product->is_visible() ? function_exists( 'cocart_get_permalink' ) ? cocart_get_permalink( get_permalink( $product->get_id() ) ) : $product->get_permalink( $cart_item ) : ''; 111 124 } 112 125 … … 124 137 * @param int $item_key Unique identifier for item in cart. 125 138 * @param array $cart_item Item details. 126 * @param object $ _productProduct data.139 * @param object $product Product data. 127 140 * 128 141 * @return array $cart_contents Cart contents after modifications. 129 142 */ 130 public function is_item_discounted( $cart_contents, $item_key, $cart_item, $ _product ) {131 $regular_price = $ _product->get_regular_price();132 $sale_price = $ _product->get_sale_price();143 public function is_item_discounted( $cart_contents, $item_key, $cart_item, $product ) { 144 $regular_price = $product->get_regular_price(); 145 $sale_price = $product->get_sale_price(); 133 146 $quantity = (int) $cart_contents[ $item_key ]['quantity']['value']; 134 147 $discounted_price = 0; 135 148 136 if ( $ _product->is_on_sale() ) {149 if ( $product->is_on_sale() ) { 137 150 $discounted_price += ( $regular_price - $sale_price ) * $quantity; 138 151 } … … 145 158 146 159 // Identify version of CoCart installed to return the following values correctly. 147 if ( version_compare( COCART_VERSION, ' 5.0.0', '>=' ) ) {148 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $regular_price ) : wc_format_decimal( $regular_price, wc_get_price_decimals());149 $cart_contents[ $item_key ]['price_sale'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $sale_price ) : wc_format_decimal( $sale_price, wc_get_price_decimals());150 $cart_contents[ $item_key ]['price_discounted'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $discounted_price ) : wc_format_decimal( $discounted_price, wc_get_price_decimals());160 if ( version_compare( COCART_VERSION, '4.4.0', '>=' ) ) { 161 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $regular_price ) : cocart_prepare_money_response( $regular_price ); 162 $cart_contents[ $item_key ]['price_sale'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $sale_price ) : cocart_prepare_money_response( $sale_price ); 163 $cart_contents[ $item_key ]['price_discounted'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $discounted_price ) : cocart_prepare_money_response( $discounted_price ); 151 164 } else { 152 165 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_prepare_money_response' ) ? cocart_prepare_money_response( $regular_price ) : wc_format_decimal( $regular_price, wc_get_price_decimals() ); … … 157 170 return $cart_contents; 158 171 } // END is_item_discounted() 172 173 /** 174 * Get thumbnail size. 175 * 176 * @access public 177 * 178 * @since 4.0.5 Introduced. 179 * 180 * @return string $thumbnail_size Thumbnail size. 181 */ 182 public function get_gallery_thumbnail_size() { 183 /** 184 * Filters the thumbnail size of the product image. 185 * 186 * @since 3.0.0 Introduced. 187 * 188 * @param string $thumbnail_size Thumbnail size. 189 */ 190 $thumbnail_size = apply_filters( 'cocart_item_gallery_thumbnail_size', 'woocommerce_thumbnail' ); 191 192 return $thumbnail_size; 193 } // END get_thumbnail_size() 159 194 } // END class 160 195 -
cocart-get-cart-enhanced/tags/4.0.5/languages/cocart-get-cart-enhanced.pot
r3131183 r3147152 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0. 4\n"5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.5\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n" 8 "POT-Creation-Date: 2024-0 8-05 16:29:54+00:00\n"8 "POT-Creation-Date: 2024-09-05 15:08:09+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 27 27 28 28 #: includes/filters/filter-v1.php:112 includes/filters/filter-v2-preview.php:92 29 #: includes/filters/filter-v2.php:6 629 #: includes/filters/filter-v2.php:65 30 30 msgid "In Stock" 31 31 msgstr "" 32 32 33 33 #: includes/filters/filter-v1.php:116 includes/filters/filter-v2-preview.php:96 34 #: includes/filters/filter-v2.php: 7034 #: includes/filters/filter-v2.php:69 35 35 msgid "Out of Stock" 36 36 msgstr "" 37 37 38 38 #: includes/filters/filter-v1.php:120 39 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:7 439 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:73 40 40 msgid "Available on backorder" 41 41 msgstr "" -
cocart-get-cart-enhanced/tags/4.0.5/load-package.php
r3131183 r3147152 3 3 * This file is designed to be used to load as package NOT a WP plugin! 4 4 * 5 * @version 4.0. 45 * @version 4.0.5 6 6 * @package CoCart - Cart API Enhanced 7 7 */ -
cocart-get-cart-enhanced/tags/4.0.5/readme.txt
r3131183 r3147152 5 5 Requires PHP: 7.4 6 6 Tested up to: 6.6 7 Stable tag: 4.0. 47 Stable tag: 4.0.5 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 19 19 Each item added to the cart will return the following: 20 20 21 * **NEW**Returns visible product attributes for all products that is not a variation product. - **Enhances API v2 ONLY**21 * Returns visible product attributes for all products that is not a variation product. - **Enhances API v2 ONLY** 22 22 * Returns the regular price and sale price if any. - **Enhances API v2 ONLY** 23 23 * Returns the discount status of items and the discounted price if any. - **Enhances API v2 ONLY** -
cocart-get-cart-enhanced/trunk/cocart-get-cart-enhanced.php
r3131183 r3147152 6 6 * Author: CoCart Headless, LLC 7 7 * Author URI: https://cocartapi.com 8 * Version: 4.0. 48 * Version: 4.0.5 9 9 * Text Domain: cocart-get-cart-enhanced 10 10 * Domain Path: /languages/ … … 13 13 * Requires Plugins: cart-rest-api-for-woocommerce 14 14 * CoCart requires at least: 4.2 15 * CoCart tested up to: 4. 315 * CoCart tested up to: 4.4 16 16 * 17 17 * @package CoCart Cart API Enhanced -
cocart-get-cart-enhanced/trunk/includes/class-cocart-get-cart-enhanced.php
r3131183 r3147152 29 29 * @var string 30 30 */ 31 public static $version = '4.0. 4';31 public static $version = '4.0.5'; 32 32 33 33 /** -
cocart-get-cart-enhanced/trunk/includes/filters/filter-v2.php
r3084216 r3147152 6 6 * @package Filters 7 7 * @since 3.0.0 8 * @version 4.0. 28 * @version 4.0.5 9 9 * @license GPL-2.0+ 10 10 */ … … 33 33 * 34 34 * @since 3.0.0 Introduced. 35 * @since 4.0.0 Added parent ID for a variation. 36 * @since 4.0.0 Added visible product attributes for all products that is not a variation product. 35 * @since 4.0.0 Added parent ID for a variation and visible product attributes for all products that is not a variation product. 37 36 * 38 37 * @param array $cart_contents Cart contents before modifications. 39 38 * @param int $item_key Unique identifier for item in cart. 40 39 * @param array $cart_item Item details. 41 * @param object $ _productProduct data.40 * @param object $product Product data. 42 41 * 43 42 * @return array $cart_contents Cart contents after modifications. 44 43 */ 45 public function return_product_details( $cart_contents, $item_key, $cart_item, $ _product ) {44 public function return_product_details( $cart_contents, $item_key, $cart_item, $product ) { 46 45 // Additional meta. 47 46 if ( isset( $cart_contents[ $item_key ]['meta'] ) ) { 48 47 if ( ! empty( $cart_contents[ $item_key ]['meta']['variation'] ) ) { 49 $cart_contents[ $item_key ]['meta']['variation']['parent_id'] = $ _product->get_parent_id();48 $cart_contents[ $item_key ]['meta']['variation']['parent_id'] = $product->get_parent_id(); 50 49 } 51 $cart_contents[ $item_key ]['meta']['attributes'] = function_exists( 'cocart_format_attribute_data' ) ? cocart_format_attribute_data( $ _product ) : array();52 $cart_contents[ $item_key ]['meta']['virtual'] = $ _product->get_virtual();53 $cart_contents[ $item_key ]['meta']['downloadable'] = $ _product->get_downloadable();50 $cart_contents[ $item_key ]['meta']['attributes'] = function_exists( 'cocart_format_attribute_data' ) ? cocart_format_attribute_data( $product ) : array(); 51 $cart_contents[ $item_key ]['meta']['virtual'] = $product->get_virtual(); 52 $cart_contents[ $item_key ]['meta']['downloadable'] = $product->get_downloadable(); 54 53 } 55 54 56 55 // Categories and Tags. 57 $cart_contents[ $item_key ]['categories'] = get_the_terms( $ _product->get_id(), 'product_cat' );58 $cart_contents[ $item_key ]['tags'] = get_the_terms( $ _product->get_id(), 'product_tag' );56 $cart_contents[ $item_key ]['categories'] = get_the_terms( $product->get_id(), 'product_cat' ); 57 $cart_contents[ $item_key ]['tags'] = get_the_terms( $product->get_id(), 'product_tag' ); 59 58 60 59 // Product stock status. 61 $status = $ _product->get_stock_status();60 $status = $product->get_stock_status(); 62 61 $color = '#a46497'; 63 62 … … 78 77 $cart_contents[ $item_key ]['stock_status'] = array( 79 78 'status' => $status, 80 'stock_quantity' => $ _product->get_stock_quantity(),79 'stock_quantity' => $product->get_stock_quantity(), 81 80 'hex_color' => $color, 82 81 ); 83 82 84 83 // Product gallery images. 85 $gallery_ids = $ _product->get_gallery_image_ids();84 $gallery_ids = $product->get_gallery_image_ids(); 86 85 87 86 $cart_contents[ $item_key ]['gallery'] = array(); … … 89 88 if ( ! empty( $gallery_ids ) ) { 90 89 foreach ( $gallery_ids as $image_id ) { 90 /** 91 * Filters the gallery ID for found image. 92 * 93 * @param int $image_id Product thumbnail ID. 94 * @param array $cart_item The cart item data. 95 * @param string $item_key Generated ID based on the product information when added to the cart. 96 */ 91 97 $gallery_id = apply_filters( 'cocart_item_gallery', $image_id, $cart_item, $item_key ); 92 98 93 $gallery_src = wp_get_attachment_image_src( $gallery_id, apply_filters( 'cocart_item_gallery_thumbnail_size', 'woocommerce_thumbnail' ) ); 99 if ( empty( $gallery_id ) ) { 100 continue; 101 } 102 103 $thumbnail_src = wp_get_attachment_image_src( $gallery_id, $this->get_gallery_thumbnail_size() ); 104 $thumbnail_src = ! empty( $thumbnail_src[0] ) ? $thumbnail_src[0] : ''; 94 105 95 106 /** 96 107 * Filters the source of the product gallery image. 97 108 * 98 * @param string $gallery_src URL of the product gallery image. 109 * @param string $thumbnail_src URL of the product thumbnail. 110 * @param array $cart_item The cart item data. 111 * @param string $item_key Generated ID based on the product information when added to the cart. 99 112 */ 100 $gallery_src = apply_filters( 'cocart_item_thumbnail_src', $ gallery_src[0], $cart_item, $item_key, $removed_item);113 $gallery_src = apply_filters( 'cocart_item_thumbnail_src', $thumbnail_src, $cart_item, $item_key ); 101 114 102 $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = $gallery_src;115 $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = esc_url( $gallery_src ); 103 116 } 104 117 } 105 118 106 119 // Permalink of product if visible. 107 if ( version_compare( COCART_VERSION, '5.0.0', ' >=' ) ) {108 $cart_contents[ $item_key ]['permalink'] = $ _product->is_visible() ? $_product->get_permalink( $cart_item ) : '';120 if ( version_compare( COCART_VERSION, '5.0.0', '<' ) ) { 121 $cart_contents[ $item_key ]['permalink'] = $product->is_visible() ? $product->get_permalink( $cart_item ) : ''; 109 122 } else { 110 $cart_contents[ $item_key ]['permalink'] = $ _product->is_visible() ? function_exists( 'cocart_get_permalink' ) ? cocart_get_permalink( get_permalink( $_product->get_id() ) ) : $_product->get_permalink( $cart_item ) : '';123 $cart_contents[ $item_key ]['permalink'] = $product->is_visible() ? function_exists( 'cocart_get_permalink' ) ? cocart_get_permalink( get_permalink( $product->get_id() ) ) : $product->get_permalink( $cart_item ) : ''; 111 124 } 112 125 … … 124 137 * @param int $item_key Unique identifier for item in cart. 125 138 * @param array $cart_item Item details. 126 * @param object $ _productProduct data.139 * @param object $product Product data. 127 140 * 128 141 * @return array $cart_contents Cart contents after modifications. 129 142 */ 130 public function is_item_discounted( $cart_contents, $item_key, $cart_item, $ _product ) {131 $regular_price = $ _product->get_regular_price();132 $sale_price = $ _product->get_sale_price();143 public function is_item_discounted( $cart_contents, $item_key, $cart_item, $product ) { 144 $regular_price = $product->get_regular_price(); 145 $sale_price = $product->get_sale_price(); 133 146 $quantity = (int) $cart_contents[ $item_key ]['quantity']['value']; 134 147 $discounted_price = 0; 135 148 136 if ( $ _product->is_on_sale() ) {149 if ( $product->is_on_sale() ) { 137 150 $discounted_price += ( $regular_price - $sale_price ) * $quantity; 138 151 } … … 145 158 146 159 // Identify version of CoCart installed to return the following values correctly. 147 if ( version_compare( COCART_VERSION, ' 5.0.0', '>=' ) ) {148 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $regular_price ) : wc_format_decimal( $regular_price, wc_get_price_decimals());149 $cart_contents[ $item_key ]['price_sale'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $sale_price ) : wc_format_decimal( $sale_price, wc_get_price_decimals());150 $cart_contents[ $item_key ]['price_discounted'] = function_exists( 'cocart_ prepare_money_response' ) ? cocart_prepare_money_response( $discounted_price ) : wc_format_decimal( $discounted_price, wc_get_price_decimals());160 if ( version_compare( COCART_VERSION, '4.4.0', '>=' ) ) { 161 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $regular_price ) : cocart_prepare_money_response( $regular_price ); 162 $cart_contents[ $item_key ]['price_sale'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $sale_price ) : cocart_prepare_money_response( $sale_price ); 163 $cart_contents[ $item_key ]['price_discounted'] = function_exists( 'cocart_format_money' ) ? cocart_format_money( $discounted_price ) : cocart_prepare_money_response( $discounted_price ); 151 164 } else { 152 165 $cart_contents[ $item_key ]['price_regular'] = function_exists( 'cocart_prepare_money_response' ) ? cocart_prepare_money_response( $regular_price ) : wc_format_decimal( $regular_price, wc_get_price_decimals() ); … … 157 170 return $cart_contents; 158 171 } // END is_item_discounted() 172 173 /** 174 * Get thumbnail size. 175 * 176 * @access public 177 * 178 * @since 4.0.5 Introduced. 179 * 180 * @return string $thumbnail_size Thumbnail size. 181 */ 182 public function get_gallery_thumbnail_size() { 183 /** 184 * Filters the thumbnail size of the product image. 185 * 186 * @since 3.0.0 Introduced. 187 * 188 * @param string $thumbnail_size Thumbnail size. 189 */ 190 $thumbnail_size = apply_filters( 'cocart_item_gallery_thumbnail_size', 'woocommerce_thumbnail' ); 191 192 return $thumbnail_size; 193 } // END get_thumbnail_size() 159 194 } // END class 160 195 -
cocart-get-cart-enhanced/trunk/languages/cocart-get-cart-enhanced.pot
r3131183 r3147152 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0. 4\n"5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.5\n" 6 6 "Report-Msgid-Bugs-To: " 7 7 "https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n" 8 "POT-Creation-Date: 2024-0 8-05 16:29:54+00:00\n"8 "POT-Creation-Date: 2024-09-05 15:08:09+00:00\n" 9 9 "MIME-Version: 1.0\n" 10 10 "Content-Type: text/plain; charset=utf-8\n" … … 27 27 28 28 #: includes/filters/filter-v1.php:112 includes/filters/filter-v2-preview.php:92 29 #: includes/filters/filter-v2.php:6 629 #: includes/filters/filter-v2.php:65 30 30 msgid "In Stock" 31 31 msgstr "" 32 32 33 33 #: includes/filters/filter-v1.php:116 includes/filters/filter-v2-preview.php:96 34 #: includes/filters/filter-v2.php: 7034 #: includes/filters/filter-v2.php:69 35 35 msgid "Out of Stock" 36 36 msgstr "" 37 37 38 38 #: includes/filters/filter-v1.php:120 39 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:7 439 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:73 40 40 msgid "Available on backorder" 41 41 msgstr "" -
cocart-get-cart-enhanced/trunk/load-package.php
r3131183 r3147152 3 3 * This file is designed to be used to load as package NOT a WP plugin! 4 4 * 5 * @version 4.0. 45 * @version 4.0.5 6 6 * @package CoCart - Cart API Enhanced 7 7 */ -
cocart-get-cart-enhanced/trunk/readme.txt
r3131183 r3147152 5 5 Requires PHP: 7.4 6 6 Tested up to: 6.6 7 Stable tag: 4.0. 47 Stable tag: 4.0.5 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 19 19 Each item added to the cart will return the following: 20 20 21 * **NEW**Returns visible product attributes for all products that is not a variation product. - **Enhances API v2 ONLY**21 * Returns visible product attributes for all products that is not a variation product. - **Enhances API v2 ONLY** 22 22 * Returns the regular price and sale price if any. - **Enhances API v2 ONLY** 23 23 * Returns the discount status of items and the discounted price if any. - **Enhances API v2 ONLY**
Note: See TracChangeset
for help on using the changeset viewer.