Plugin Directory

Changeset 3131183


Ignore:
Timestamp:
08/05/2024 04:40:55 PM (20 months ago)
Author:
sebd86
Message:

Releasing "v4.0.4"

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

Legend:

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

    r3126364 r3131183  
    66 * Author:      CoCart Headless, LLC
    77 * Author URI:  https://cocartapi.com
    8  * Version:     4.0.3
     8 * Version:     4.0.4
    99 * Text Domain: cocart-get-cart-enhanced
    1010 * Domain Path: /languages/
  • cocart-get-cart-enhanced/tags/4.0.4/includes/class-cocart-get-cart-enhanced.php

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

    r3084216 r3131183  
    382382        public static function get_cart_key() {
    383383            // Current user ID.
    384             $cart_key = strval( get_current_user_id() );
     384            $current_user_id = strval( get_current_user_id() );
     385
     386            if ( $current_user_id > 0 ) {
     387                return $current_user_id;
     388            }
     389
     390            // Customer ID used as the cart key by default.
     391            $cart_key = WC()->session->get_customer_id();
    385392
    386393            // Get cart cookie... if any.
     
    393400
    394401            // Check if we requested to load a specific cart.
    395             if ( isset( $_REQUEST['cart_key'] ) || isset( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    396                 $cart_key = isset( $_REQUEST['cart_key'] ) ? trim( esc_html( sanitize_key( wp_unslash( $_REQUEST['cart_key'] ) ) ) ) : trim( esc_html( sanitize_key( wp_unslash( $_REQUEST['id'] ) ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     402            if ( ! empty( $_REQUEST['cart_key'] ) || ! empty( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     403                $cart_key = isset( $_REQUEST['cart_key'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['cart_key'] ) ) : sanitize_text_field( wp_unslash( $_REQUEST['id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    397404            }
    398405
  • cocart-get-cart-enhanced/tags/4.0.4/languages/cocart-get-cart-enhanced.pot

    r3126364 r3131183  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.3\n"
     5"Project-Id-Version: CoCart - Cart API Enhanced 4.0.4\n"
    66"Report-Msgid-Bugs-To: "
    77"https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n"
    8 "POT-Creation-Date: 2024-07-27 02:36:32+00:00\n"
     8"POT-Creation-Date: 2024-08-05 16:29:54+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    4747msgstr ""
    4848
    49 #: includes/filters/filter-v1.php:529
     49#: includes/filters/filter-v1.php:536
    5050msgid "Free shipping coupon"
    5151msgstr ""
    5252
    53 #: includes/filters/filter-v1.php:676
     53#: includes/filters/filter-v1.php:683
    5454msgid "An item which is no longer available was removed from your cart."
    5555msgstr ""
    5656
    57 #: includes/filters/filter-v1.php:683
     57#: includes/filters/filter-v1.php:690
    5858#. translators: %s: product name
    5959msgid "There are too many "%s" in the cart. Only 1 can be purchased."
    6060msgstr ""
    6161
    62 #: includes/filters/filter-v1.php:717
     62#: includes/filters/filter-v1.php:724
    6363#. translators: %s: product name
    6464msgid "Sorry, \"%s\" is not in stock and cannot be purchased."
    6565msgstr ""
    6666
    67 #: includes/filters/filter-v1.php:742
     67#: includes/filters/filter-v1.php:749
    6868#. translators: 1: product name 2: quantity in stock
    6969msgid ""
  • cocart-get-cart-enhanced/tags/4.0.4/load-package.php

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

    r3126364 r3131183  
    55Requires PHP: 7.4
    66Tested up to: 6.6
    7 Stable tag: 4.0.3
     7Stable tag: 4.0.4
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • cocart-get-cart-enhanced/trunk/cocart-get-cart-enhanced.php

    r3126364 r3131183  
    66 * Author:      CoCart Headless, LLC
    77 * Author URI:  https://cocartapi.com
    8  * Version:     4.0.3
     8 * Version:     4.0.4
    99 * Text Domain: cocart-get-cart-enhanced
    1010 * Domain Path: /languages/
  • cocart-get-cart-enhanced/trunk/includes/class-cocart-get-cart-enhanced.php

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

    r3084216 r3131183  
    382382        public static function get_cart_key() {
    383383            // Current user ID.
    384             $cart_key = strval( get_current_user_id() );
     384            $current_user_id = strval( get_current_user_id() );
     385
     386            if ( $current_user_id > 0 ) {
     387                return $current_user_id;
     388            }
     389
     390            // Customer ID used as the cart key by default.
     391            $cart_key = WC()->session->get_customer_id();
    385392
    386393            // Get cart cookie... if any.
     
    393400
    394401            // Check if we requested to load a specific cart.
    395             if ( isset( $_REQUEST['cart_key'] ) || isset( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    396                 $cart_key = isset( $_REQUEST['cart_key'] ) ? trim( esc_html( sanitize_key( wp_unslash( $_REQUEST['cart_key'] ) ) ) ) : trim( esc_html( sanitize_key( wp_unslash( $_REQUEST['id'] ) ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     402            if ( ! empty( $_REQUEST['cart_key'] ) || ! empty( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     403                $cart_key = isset( $_REQUEST['cart_key'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['cart_key'] ) ) : sanitize_text_field( wp_unslash( $_REQUEST['id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    397404            }
    398405
  • cocart-get-cart-enhanced/trunk/languages/cocart-get-cart-enhanced.pot

    r3126364 r3131183  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CoCart - Cart API Enhanced 4.0.3\n"
     5"Project-Id-Version: CoCart - Cart API Enhanced 4.0.4\n"
    66"Report-Msgid-Bugs-To: "
    77"https://github.com/cocart-headless/cocart-get-cart-enhanced/issues\n"
    8 "POT-Creation-Date: 2024-07-27 02:36:32+00:00\n"
     8"POT-Creation-Date: 2024-08-05 16:29:54+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    4747msgstr ""
    4848
    49 #: includes/filters/filter-v1.php:529
     49#: includes/filters/filter-v1.php:536
    5050msgid "Free shipping coupon"
    5151msgstr ""
    5252
    53 #: includes/filters/filter-v1.php:676
     53#: includes/filters/filter-v1.php:683
    5454msgid "An item which is no longer available was removed from your cart."
    5555msgstr ""
    5656
    57 #: includes/filters/filter-v1.php:683
     57#: includes/filters/filter-v1.php:690
    5858#. translators: %s: product name
    5959msgid "There are too many "%s" in the cart. Only 1 can be purchased."
    6060msgstr ""
    6161
    62 #: includes/filters/filter-v1.php:717
     62#: includes/filters/filter-v1.php:724
    6363#. translators: %s: product name
    6464msgid "Sorry, \"%s\" is not in stock and cannot be purchased."
    6565msgstr ""
    6666
    67 #: includes/filters/filter-v1.php:742
     67#: includes/filters/filter-v1.php:749
    6868#. translators: 1: product name 2: quantity in stock
    6969msgid ""
  • cocart-get-cart-enhanced/trunk/load-package.php

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

    r3126364 r3131183  
    55Requires PHP: 7.4
    66Tested up to: 6.6
    7 Stable tag: 4.0.3
     7Stable tag: 4.0.4
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.