Plugin Directory

Changeset 2768193


Ignore:
Timestamp:
08/09/2022 07:23:33 AM (4 years ago)
Author:
tribeinteractive
Message:

Plugin updated to version 1.9.3

Location:
caddy
Files:
87 added
4 edited

Legend:

Unmodified
Added
Removed
  • caddy/trunk/README.txt

    r2760135 r2768193  
    77Tested up to: 6.0
    88Requires PHP: 7.0
    9 Stable tag: v1.9.2
     9Stable tag: v1.9.3
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9494
    9595== Changelog ==
     96
     97= 1.9.3 =
     98* Fix: Call to a member function is_empty() on null
     99* Fix: Cart object condition check on the cart screen
     100* Improvement: Free shipping total calculation is round-up
     101* Improvement: Convert all the integer value to float for better calculations
    96102
    97103= 1.9.2 =
  • caddy/trunk/caddy.php

    r2760135 r2768193  
    44 * Plugin URI:        https://usecaddy.com
    55 * Description:       A high performance, conversion-boosting side cart for your WooCommerce store that improves the shopping experience & helps grow your sales.
    6  * Version:           1.9.2
     6 * Version:           1.9.3
    77 * Author:            Tribe Interactive
    88 * Author URI:        https://www.madebytribe.com
     
    2525 */
    2626if ( ! defined( 'CADDY_VERSION' ) ) {
    27     define( 'CADDY_VERSION', '1.9.2' );
     27    define( 'CADDY_VERSION', '1.9.3' );
    2828}
    2929if ( ! defined( 'CADDY_PLUGIN_FILE' ) ) {
  • caddy/trunk/public/class-caddy-public.php

    r2760126 r2768193  
    483483            }
    484484            $cc_cart_subtotal    = WC()->cart->get_displayed_subtotal();
    485             $caddy_cart_subtotal = (int) ( $cc_cart_subtotal - $coupon_discount_amount );
     485            $caddy_cart_subtotal = (float) ( $cc_cart_subtotal - $coupon_discount_amount );
    486486
    487487            $this->get_refreshed_fragments();
     
    523523            $cc_free_shipping_amount = get_option( 'cc_free_shipping_amount' );
    524524
    525             $free_shipping_remaining_amount = absint( $cc_free_shipping_amount ) - absint( $final_cart_subtotal );
     525            $free_shipping_remaining_amount = floatval( $cc_free_shipping_amount ) - floatval( $final_cart_subtotal );
    526526            $free_shipping_remaining_amount = ! empty( $free_shipping_remaining_amount ) ? $free_shipping_remaining_amount : 0;
    527527
     
    596596
    597597        $cart_total              = floatval( preg_replace( '#[^\d.]#', '', WC()->cart->get_cart_contents_total() ) );
    598         $subcart_total           = (int) number_format( $cart_total, 2 );
    599         $cc_free_shipping_amount = (int) get_option( 'cc_free_shipping_amount' );
     598        $subcart_total           = (float) number_format( $cart_total, 2 );
     599        $cc_free_shipping_amount = (float) get_option( 'cc_free_shipping_amount' );
    600600
    601601        if ( ! empty( $cc_free_shipping_amount ) ) {
     
    876876            $cc_free_shipping_amount = get_option( 'cc_free_shipping_amount' );
    877877
    878             $free_shipping_remaining_amount = absint( $cc_free_shipping_amount ) - absint( $final_cart_subtotal );
     878            $free_shipping_remaining_amount = floatval( $cc_free_shipping_amount ) - floatval( $final_cart_subtotal );
    879879            $free_shipping_remaining_amount = ! empty( $free_shipping_remaining_amount ) ? $free_shipping_remaining_amount : 0;
    880880
  • caddy/trunk/public/partials/cc-cart-screen.php

    r2760126 r2768193  
    55}
    66
    7 $cc_empty_class = ( WC()->cart->is_empty() ) ? ' cc-empty' : '';
    8 
     7if ( ! is_object( WC()->cart ) ) {
     8    return;
     9}
     10
     11$cc_empty_class          = ( WC()->cart->is_empty() ) ? ' cc-empty' : '';
    912$cart_total              = floatval( preg_replace( '#[^\d.]#', '', WC()->cart->get_cart_contents_total() ) );
    1013$cc_free_shipping_amount = get_option( 'cc_free_shipping_amount' );
     
    1316$cc_free_shipping_bar    = true;
    1417
    15 $free_shipping_remaining_amount = absint( $cc_free_shipping_amount ) - absint( $cart_total );
     18$free_shipping_remaining_amount = floatval( $cc_free_shipping_amount ) - floatval( $cart_total );
    1619$free_shipping_remaining_amount = ! empty( $free_shipping_remaining_amount ) ? $free_shipping_remaining_amount : 0;
    1720
Note: See TracChangeset for help on using the changeset viewer.