Plugin Directory

Changeset 3248052


Ignore:
Timestamp:
02/27/2025 06:45:22 PM (13 months ago)
Author:
ceretax
Message:

CereTax woo Commerce Release V1.3.8
Include previous versions in Tag folder.

Location:
ceretax/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ceretax/trunk/ceretax.php

    r3245884 r3248052  
    44 * Plugin URI: https://wordpress.org/plugins/ceretax/
    55 * Description: Simplify sales tax complexity with CereTax for WooCommerce.
    6  * Version: 1.3.7
     6 * Version: 1.3.8
    77 * Author: CereTax, Inc.
    88 * Author URI: https://www.ceretax.com/
  • ceretax/trunk/changelog.txt

    r3245884 r3248052  
    36362025-02-24 - version 1.3.7
    3737* fix - If the tax showing zero in order calculation issue
     38
     392025-02-27 - version 1.3.8
     40* fix - Restore to 1.3.6 functionality
     41
  • ceretax/trunk/inc/admin/class-cwafc-admin-action.php

    r3245884 r3248052  
    389389         */
    390390        public function action__cwafc_admin_footer_function() {
    391             $order_id = null;
     391
    392392            if ( ( isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) || ( isset( $_GET['id'] ) && ! empty( $_GET['id'] ) ) ) {
    393393                if ( isset( $_GET['post'] ) && ! empty( $_GET['post'] ) ) {
  • ceretax/trunk/inc/class-cwafc.php

    r3245884 r3248052  
    115115
    116116            $ceretax_data = get_post_meta( $order_id, 'ceretax_data', true );
    117 
    118             // If it's empty or an invalid JSON string, return early.
    119             if ( empty( $ceretax_data ) || ! is_string( $ceretax_data ) || json_decode( $ceretax_data ) === null ) {
     117            if ( empty( $ceretax_data ) ) {
    120118                return;
    121119            }
    122             $ceretax_data = json_decode( $ceretax_data );
    123 
    124             // Ensure decoding is successful and required property exists.
    125             if ( ! $ceretax_data || ! isset( $ceretax_data->invoice->totalTaxInvoice ) ) {
    126                 return;
    127             }
    128 
     120            $ceretax_data      = json_decode( $ceretax_data );
    129121            $cere_tax_name     = get_option( CWAFC_PREFIX . '_cere_tax_name', 'Tax' );
    130122            $total_tax_invoice = abs( $ceretax_data->invoice->totalTaxInvoice );
     123
    131124            $order             = wc_get_order( $order_id );
    132125            $fee_amount        = null;
    133126            $order_total_fees  = $order->get_total_fees();
    134127            $order_remain_fees = 0;
    135 
    136128            foreach ( $order->get_fees() as $fee_id => $fee ) {
    137129                if ( $fee->get_name() === $cere_tax_name ) {
     
    144136                }
    145137            }
     138
    146139            if ( 0 < $order_remain_fees ) {
    147140                echo '<tr>';
     
    754747        public function action__cwafc_checkout_field_update_order_meta( $order_id ) {
    755748            $ceretax_data = WC()->session->get( 'ceretax_data' );
    756             if ( ! empty( $ceretax_data ) ) {
    757                 update_post_meta( $order_id, 'ceretax_data', wp_json_encode( $ceretax_data ) );
    758             }
     749            update_post_meta( $order_id, 'ceretax_data', wp_json_encode( $ceretax_data ) );
    759750        }
    760751
     
    13421333                    }
    13431334                    update_post_meta( $order->get_id(), 'ceretax_data', wp_json_encode( $data ) );
    1344                     WC()->session->set( 'ceretax_data', $data );
    13451335                    return $data['invoice']['totalTaxInvoice'];
    13461336                }
     
    13821372                    }
    13831373                    update_post_meta( $order->get_id(), 'ceretax_data', wp_json_encode( $data ) );
    1384                     WC()->session->set( 'ceretax_data', $data );
    13851374                    return $data['invoice']['totalTaxInvoice'];
    13861375                }
  • ceretax/trunk/readme.txt

    r3245884 r3248052  
    55Tested up to: 6.6.1
    66Requires PHP: 7.4
    7 Stable tag: 1.3.7
     7Stable tag: 1.3.8
    88License: GNU General Public License v3.0
    99URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3535
    3636== Changelog ==
     37
     38= 1.3.8 =
     39* fix - Restore to 1.3.6 functionality
    3740
    3841= 1.3.7 =
     
    7477== Upgrade Notice ==
    7578
     79= 1.3.8 =
     80* fix - Restore to 1.3.6 functionality
     81
    7682= 1.3.7 =
    7783* fix - If the tax showing zero in order calculation issue
Note: See TracChangeset for help on using the changeset viewer.