Plugin Directory

Changeset 2389903


Ignore:
Timestamp:
09/28/2020 08:24:11 PM (5 years ago)
Author:
taxjar
Message:

Preparing for 3.2.3 release

Location:
taxjar-simplified-taxes-for-woocommerce/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • taxjar-simplified-taxes-for-woocommerce/trunk/CHANGELOG.md

    r2374160 r2389903  
     1# 3.2.3 (2020-09-28)
     2* Add filter to nexus check
     3* Decouple tax calculation and transaction sync settings
     4
    15# 3.2.2 (2020-09-02)
    26* Fix international store address validation
  • taxjar-simplified-taxes-for-woocommerce/trunk/includes/class-wc-taxjar-nexus.php

    r2168437 r2389903  
    5151
    5252    public function has_nexus_check( $country, $state = null ) {
     53        $has_nexus = false;
    5354        $store_settings   = $this->integration->get_store_settings();
    5455        $from_country     = $store_settings['country'];
     
    5859
    5960        if ( count( $nexus_areas ) == 0 ) {
    60             return true;
     61            $has_nexus = true;
    6162        }
    6263
     
    7273            if ( isset( $nexus->country_code ) && isset( $nexus->region_code ) && 'US' == $nexus->country_code ) {
    7374                if ( $country == $nexus->country_code && $state == $nexus->region_code ) {
    74                     return true;
     75                    $has_nexus = true;
    7576                }
    7677            } elseif ( isset( $nexus->country_code ) ) {
    7778                if ( $country == $nexus->country_code ) {
    78                     return true;
     79                    $has_nexus = true;
    7980                }
    8081
    8182                if ( 'GB' == $country && 'UK' == $nexus->country_code ) {
    82                     return true;
     83                    $has_nexus = true;
    8384                }
    8485
    8586                if ( 'GR' == $country && 'EL' == $nexus->country_code ) {
    86                     return true;
     87                    $has_nexus = true;
    8788                }
    8889            }
    8990        }
    9091
    91         return false;
     92        return apply_filters( 'taxjar_nexus_check', $has_nexus, $country, $state, $nexus_areas );
    9293    }
    9394
  • taxjar-simplified-taxes-for-woocommerce/trunk/includes/class-wc-taxjar-transaction-sync.php

    r2235442 r2389903  
    3030     */
    3131    public function init() {
    32         if ( apply_filters( 'taxjar_enabled', isset( $this->taxjar_integration->settings['enabled'] ) && 'yes' == $this->taxjar_integration->settings['enabled'] ) ) {
     32        $sales_tax_enabled = apply_filters( 'taxjar_enabled', isset( $this->taxjar_integration->settings['enabled'] ) && 'yes' == $this->taxjar_integration->settings['enabled'] );
     33        $transaction_sync_enabled = isset( $this->taxjar_integration->settings['taxjar_download'] ) && 'yes' == $this->taxjar_integration->settings['taxjar_download'];
     34
     35        if ( $sales_tax_enabled || $transaction_sync_enabled ) {
    3336            add_action( 'init', array( __CLASS__, 'schedule_process_queue' ) );
    3437            add_action( self::PROCESS_QUEUE_HOOK, array( $this, 'process_queue' ) );
    35 
    36             if ( isset( $this->taxjar_integration->settings['taxjar_download'] ) && 'yes' == $this->taxjar_integration->settings['taxjar_download'] ) {
    37                 add_action( 'woocommerce_new_order', array( __CLASS__, 'order_updated' ) );
    38                 add_action( 'woocommerce_update_order', array( __CLASS__, 'order_updated' ) );
    39 
    40                 add_action( 'woocommerce_order_refunded', array( __CLASS__, 'refund_created' ), 10, 2 );
    41 
    42                 add_filter( 'woocommerce_order_actions', array( $this, 'add_order_meta_box_action' ) );
    43                 add_action( 'woocommerce_order_action_taxjar_sync_action', array( $this, 'manual_order_sync' ) );
    44 
    45                 add_action( 'wp_trash_post', array( $this, 'maybe_delete_transaction_from_taxjar' ), 9, 1 );
    46                 add_action( 'before_delete_post', array( $this, 'maybe_delete_transaction_from_taxjar' ), 9, 1 );
    47                 add_action( 'before_delete_post', array( $this, 'maybe_delete_refund_from_taxjar' ), 9, 1 );
    48                 add_action( 'untrashed_post', array( $this, 'untrash_post' ), 11 );
    49 
    50                 add_action( 'woocommerce_order_status_cancelled', array( $this, 'order_cancelled' ), 10, 2 );
    51 
    52                 add_action( 'woocommerce_product_options_tax', array( $this, 'display_notice_after_product_options_tax' ), 5 );
    53                 add_action( 'woocommerce_variation_options_tax', array( $this, 'display_notice_after_product_options_tax' ), 5 );
    54             }
     38        }
     39
     40        if ( $transaction_sync_enabled ) {
     41            add_action( 'woocommerce_new_order', array( __CLASS__, 'order_updated' ) );
     42            add_action( 'woocommerce_update_order', array( __CLASS__, 'order_updated' ) );
     43
     44            add_action( 'woocommerce_order_refunded', array( __CLASS__, 'refund_created' ), 10, 2 );
     45
     46            add_filter( 'woocommerce_order_actions', array( $this, 'add_order_meta_box_action' ) );
     47            add_action( 'woocommerce_order_action_taxjar_sync_action', array( $this, 'manual_order_sync' ) );
     48
     49            add_action( 'wp_trash_post', array( $this, 'maybe_delete_transaction_from_taxjar' ), 9, 1 );
     50            add_action( 'before_delete_post', array( $this, 'maybe_delete_transaction_from_taxjar' ), 9, 1 );
     51            add_action( 'before_delete_post', array( $this, 'maybe_delete_refund_from_taxjar' ), 9, 1 );
     52            add_action( 'untrashed_post', array( $this, 'untrash_post' ), 11 );
     53
     54            add_action( 'woocommerce_order_status_cancelled', array( $this, 'order_cancelled' ), 10, 2 );
     55
     56            add_action( 'woocommerce_product_options_tax', array( $this, 'display_notice_after_product_options_tax' ), 5 );
     57            add_action( 'woocommerce_variation_options_tax', array( $this, 'display_notice_after_product_options_tax' ), 5 );
    5558        }
    5659    }
  • taxjar-simplified-taxes-for-woocommerce/trunk/readme.txt

    r2374160 r2389903  
    44Requires at least: 4.2
    55Tested up to: 5.5.1
    6 Stable tag: 3.2.2
     6Stable tag: 3.2.3
    77License: GPLv2 or later
    88URI: http://www.gnu.org/licenses/gpl-2.0.html
    99WC requires at least: 3.2.0
    10 WC tested up to: 4.4.1
     10WC tested up to: 4.5.2
    1111
    1212Trusted by more than 20,000 businesses, TaxJar’s award-winning solution makes it easy to automate sales tax reporting and filing, and determine economic nexus with a single click.
     
    9696
    9797== Changelog ==
     98
     99= 3.2.3 (2020-09-28)
     100* Add filter to nexus check
     101* Decouple tax calculation and transaction sync settings
    98102
    99103= 3.2.2 (2020-09-02)
  • taxjar-simplified-taxes-for-woocommerce/trunk/taxjar-woocommerce.php

    r2374160 r2389903  
    44 * Plugin URI: https://www.taxjar.com/woocommerce-sales-tax-plugin/
    55 * Description: Save hours every month by putting your sales tax on autopilot. Automated, multi-state sales tax calculation, collection, and filing.
    6  * Version: 3.2.2
     6 * Version: 3.2.3
    77 * Author: TaxJar
    88 * Author URI: https://www.taxjar.com
    99 * WC requires at least: 3.2.0
    10  * WC tested up to: 4.4.1
     10 * WC tested up to: 4.5.2
    1111 *
    1212 * Copyright: © 2014-2019 TaxJar. TaxJar is a trademark of TPS Unlimited, Inc.
     
    4343final class WC_Taxjar {
    4444
    45     static $version = '3.2.2';
     45    static $version = '3.2.3';
    4646    public static $minimum_woocommerce_version = '3.2.0';
    4747
Note: See TracChangeset for help on using the changeset viewer.