Plugin Directory

Changeset 3147152


Ignore:
Timestamp:
09/05/2024 03:15:27 PM (19 months ago)
Author:
sebd86
Message:

Releasing 4.0.5

Location:
cocart-get-cart-enhanced
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • cocart-get-cart-enhanced/tags/4.0.5/cocart-get-cart-enhanced.php

    r3131183 r3147152  
    66 * Author:      CoCart Headless, LLC
    77 * Author URI:  https://cocartapi.com
    8  * Version:     4.0.4
     8 * Version:     4.0.5
    99 * Text Domain: cocart-get-cart-enhanced
    1010 * Domain Path: /languages/
     
    1313 * Requires Plugins: cart-rest-api-for-woocommerce
    1414 * CoCart requires at least: 4.2
    15  * CoCart tested up to: 4.3
     15 * CoCart tested up to: 4.4
    1616 *
    1717 * @package CoCart Cart API Enhanced
  • cocart-get-cart-enhanced/tags/4.0.5/includes/class-cocart-get-cart-enhanced.php

    r3131183 r3147152  
    2929     * @var string
    3030     */
    31     public static $version = '4.0.4';
     31    public static $version = '4.0.5';
    3232
    3333    /**
  • cocart-get-cart-enhanced/tags/4.0.5/includes/filters/filter-v2.php

    r3084216 r3147152  
    66 * @package Filters
    77 * @since   3.0.0
    8  * @version 4.0.2
     8 * @version 4.0.5
    99 * @license GPL-2.0+
    1010 */
     
    3333         *
    3434         * @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.
    3736         *
    3837         * @param array  $cart_contents Cart contents before modifications.
    3938         * @param int    $item_key      Unique identifier for item in cart.
    4039         * @param array  $cart_item     Item details.
    41          * @param object $_product      Product data.
     40         * @param object $product       Product data.
    4241         *
    4342         * @return array $cart_contents Cart contents after modifications.
    4443         */
    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 ) {
    4645            // Additional meta.
    4746            if ( isset( $cart_contents[ $item_key ]['meta'] ) ) {
    4847                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();
    5049                }
    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();
    5453            }
    5554
    5655            // 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' );
    5958
    6059            // Product stock status.
    61             $status = $_product->get_stock_status();
     60            $status = $product->get_stock_status();
    6261            $color  = '#a46497';
    6362
     
    7877            $cart_contents[ $item_key ]['stock_status'] = array(
    7978                'status'         => $status,
    80                 'stock_quantity' => $_product->get_stock_quantity(),
     79                'stock_quantity' => $product->get_stock_quantity(),
    8180                'hex_color'      => $color,
    8281            );
    8382
    8483            // Product gallery images.
    85             $gallery_ids = $_product->get_gallery_image_ids();
     84            $gallery_ids = $product->get_gallery_image_ids();
    8685
    8786            $cart_contents[ $item_key ]['gallery'] = array();
     
    8988            if ( ! empty( $gallery_ids ) ) {
    9089                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                     */
    9197                    $gallery_id = apply_filters( 'cocart_item_gallery', $image_id, $cart_item, $item_key );
    9298
    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] : '';
    94105
    95106                    /**
    96107                     * Filters the source of the product gallery image.
    97108                     *
    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.
    99112                     */
    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 );
    101114
    102                     $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = $gallery_src;
     115                    $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = esc_url( $gallery_src );
    103116                }
    104117            }
    105118
    106119            // 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 ) : '';
    109122            } 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 ) : '';
    111124            }
    112125
     
    124137         * @param int    $item_key      Unique identifier for item in cart.
    125138         * @param array  $cart_item     Item details.
    126          * @param object $_product      Product data.
     139         * @param object $product       Product data.
    127140         *
    128141         * @return array $cart_contents Cart contents after modifications.
    129142         */
    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();
    133146            $quantity         = (int) $cart_contents[ $item_key ]['quantity']['value'];
    134147            $discounted_price = 0;
    135148
    136             if ( $_product->is_on_sale() ) {
     149            if ( $product->is_on_sale() ) {
    137150                $discounted_price += ( $regular_price - $sale_price ) * $quantity;
    138151            }
     
    145158
    146159            // 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 );
    151164            } else {
    152165                $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() );
     
    157170            return $cart_contents;
    158171        } // 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()
    159194    } // END class
    160195
  • cocart-get-cart-enhanced/tags/4.0.5/languages/cocart-get-cart-enhanced.pot

    r3131183 r3147152  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.4\n"
     5"Project-Id-Version: CoCart - Cart API Enhanced 4.0.5\n"
    66"Report-Msgid-Bugs-To: "
    77"https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n"
    8 "POT-Creation-Date: 2024-08-05 16:29:54+00:00\n"
     8"POT-Creation-Date: 2024-09-05 15:08:09+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    2727
    2828#: includes/filters/filter-v1.php:112 includes/filters/filter-v2-preview.php:92
    29 #: includes/filters/filter-v2.php:66
     29#: includes/filters/filter-v2.php:65
    3030msgid "In Stock"
    3131msgstr ""
    3232
    3333#: includes/filters/filter-v1.php:116 includes/filters/filter-v2-preview.php:96
    34 #: includes/filters/filter-v2.php:70
     34#: includes/filters/filter-v2.php:69
    3535msgid "Out of Stock"
    3636msgstr ""
    3737
    3838#: includes/filters/filter-v1.php:120
    39 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:74
     39#: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:73
    4040msgid "Available on backorder"
    4141msgstr ""
  • cocart-get-cart-enhanced/tags/4.0.5/load-package.php

    r3131183 r3147152  
    33 * This file is designed to be used to load as package NOT a WP plugin!
    44 *
    5  * @version 4.0.4
     5 * @version 4.0.5
    66 * @package CoCart - Cart API Enhanced
    77 */
  • cocart-get-cart-enhanced/tags/4.0.5/readme.txt

    r3131183 r3147152  
    55Requires PHP: 7.4
    66Tested up to: 6.6
    7 Stable tag: 4.0.4
     7Stable tag: 4.0.5
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1919Each item added to the cart will return the following:
    2020
    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**
    2222 * Returns the regular price and sale price if any. - **Enhances API v2 ONLY**
    2323 * 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  
    66 * Author:      CoCart Headless, LLC
    77 * Author URI:  https://cocartapi.com
    8  * Version:     4.0.4
     8 * Version:     4.0.5
    99 * Text Domain: cocart-get-cart-enhanced
    1010 * Domain Path: /languages/
     
    1313 * Requires Plugins: cart-rest-api-for-woocommerce
    1414 * CoCart requires at least: 4.2
    15  * CoCart tested up to: 4.3
     15 * CoCart tested up to: 4.4
    1616 *
    1717 * @package CoCart Cart API Enhanced
  • cocart-get-cart-enhanced/trunk/includes/class-cocart-get-cart-enhanced.php

    r3131183 r3147152  
    2929     * @var string
    3030     */
    31     public static $version = '4.0.4';
     31    public static $version = '4.0.5';
    3232
    3333    /**
  • cocart-get-cart-enhanced/trunk/includes/filters/filter-v2.php

    r3084216 r3147152  
    66 * @package Filters
    77 * @since   3.0.0
    8  * @version 4.0.2
     8 * @version 4.0.5
    99 * @license GPL-2.0+
    1010 */
     
    3333         *
    3434         * @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.
    3736         *
    3837         * @param array  $cart_contents Cart contents before modifications.
    3938         * @param int    $item_key      Unique identifier for item in cart.
    4039         * @param array  $cart_item     Item details.
    41          * @param object $_product      Product data.
     40         * @param object $product       Product data.
    4241         *
    4342         * @return array $cart_contents Cart contents after modifications.
    4443         */
    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 ) {
    4645            // Additional meta.
    4746            if ( isset( $cart_contents[ $item_key ]['meta'] ) ) {
    4847                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();
    5049                }
    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();
    5453            }
    5554
    5655            // 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' );
    5958
    6059            // Product stock status.
    61             $status = $_product->get_stock_status();
     60            $status = $product->get_stock_status();
    6261            $color  = '#a46497';
    6362
     
    7877            $cart_contents[ $item_key ]['stock_status'] = array(
    7978                'status'         => $status,
    80                 'stock_quantity' => $_product->get_stock_quantity(),
     79                'stock_quantity' => $product->get_stock_quantity(),
    8180                'hex_color'      => $color,
    8281            );
    8382
    8483            // Product gallery images.
    85             $gallery_ids = $_product->get_gallery_image_ids();
     84            $gallery_ids = $product->get_gallery_image_ids();
    8685
    8786            $cart_contents[ $item_key ]['gallery'] = array();
     
    8988            if ( ! empty( $gallery_ids ) ) {
    9089                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                     */
    9197                    $gallery_id = apply_filters( 'cocart_item_gallery', $image_id, $cart_item, $item_key );
    9298
    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] : '';
    94105
    95106                    /**
    96107                     * Filters the source of the product gallery image.
    97108                     *
    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.
    99112                     */
    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 );
    101114
    102                     $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = $gallery_src;
     115                    $cart_contents[ $item_key ]['gallery'][ $gallery_id ] = esc_url( $gallery_src );
    103116                }
    104117            }
    105118
    106119            // 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 ) : '';
    109122            } 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 ) : '';
    111124            }
    112125
     
    124137         * @param int    $item_key      Unique identifier for item in cart.
    125138         * @param array  $cart_item     Item details.
    126          * @param object $_product      Product data.
     139         * @param object $product       Product data.
    127140         *
    128141         * @return array $cart_contents Cart contents after modifications.
    129142         */
    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();
    133146            $quantity         = (int) $cart_contents[ $item_key ]['quantity']['value'];
    134147            $discounted_price = 0;
    135148
    136             if ( $_product->is_on_sale() ) {
     149            if ( $product->is_on_sale() ) {
    137150                $discounted_price += ( $regular_price - $sale_price ) * $quantity;
    138151            }
     
    145158
    146159            // 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 );
    151164            } else {
    152165                $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() );
     
    157170            return $cart_contents;
    158171        } // 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()
    159194    } // END class
    160195
  • cocart-get-cart-enhanced/trunk/languages/cocart-get-cart-enhanced.pot

    r3131183 r3147152  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.4\n"
     5"Project-Id-Version: CoCart - Cart API Enhanced 4.0.5\n"
    66"Report-Msgid-Bugs-To: "
    77"https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n"
    8 "POT-Creation-Date: 2024-08-05 16:29:54+00:00\n"
     8"POT-Creation-Date: 2024-09-05 15:08:09+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    2727
    2828#: includes/filters/filter-v1.php:112 includes/filters/filter-v2-preview.php:92
    29 #: includes/filters/filter-v2.php:66
     29#: includes/filters/filter-v2.php:65
    3030msgid "In Stock"
    3131msgstr ""
    3232
    3333#: includes/filters/filter-v1.php:116 includes/filters/filter-v2-preview.php:96
    34 #: includes/filters/filter-v2.php:70
     34#: includes/filters/filter-v2.php:69
    3535msgid "Out of Stock"
    3636msgstr ""
    3737
    3838#: includes/filters/filter-v1.php:120
    39 #: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:74
     39#: includes/filters/filter-v2-preview.php:100 includes/filters/filter-v2.php:73
    4040msgid "Available on backorder"
    4141msgstr ""
  • cocart-get-cart-enhanced/trunk/load-package.php

    r3131183 r3147152  
    33 * This file is designed to be used to load as package NOT a WP plugin!
    44 *
    5  * @version 4.0.4
     5 * @version 4.0.5
    66 * @package CoCart - Cart API Enhanced
    77 */
  • cocart-get-cart-enhanced/trunk/readme.txt

    r3131183 r3147152  
    55Requires PHP: 7.4
    66Tested up to: 6.6
    7 Stable tag: 4.0.4
     7Stable tag: 4.0.5
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1919Each item added to the cart will return the following:
    2020
    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**
    2222 * Returns the regular price and sale price if any. - **Enhances API v2 ONLY**
    2323 * 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.