diff --git a/changelog.txt b/changelog.txt index 46ed9422..fcba9792 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,14 @@ Changelog for Simple Sales Tax Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). += [7.0.3] - 2022-11-02 = + +Fixed: +- Order exemption certificates by created date in certificate table + +Changed: +- Bump tested WooCommerce version to 7.1 + = [7.0.2] - 2022-10-14 = Fixed: diff --git a/cypress/e2e/frontend/coupon-calculations.cy.js b/cypress/e2e/frontend/coupon-calculations.cy.js index 4beaaeeb..5adc77f7 100644 --- a/cypress/e2e/frontend/coupon-calculations.cy.js +++ b/cypress/e2e/frontend/coupon-calculations.cy.js @@ -25,6 +25,7 @@ describe('Coupon calculations', () => { cy.addProductToCart('General Product'); cy.visit('/cart/'); + removeCoupon(); cy.get('.shipping-calculator-button').click(); cy.get('#calc_shipping_state').select('NY', {force: true}); @@ -34,7 +35,7 @@ describe('Coupon calculations', () => { cy.waitForBlockedElements(); }); - beforeEach(() => { + afterEach(() => { removeCoupon(); }); diff --git a/cypress/e2e/rest/create-order.cy.js b/cypress/e2e/rest/create-order.cy.js index 66dc83f3..70ca07f4 100644 --- a/cypress/e2e/rest/create-order.cy.js +++ b/cypress/e2e/rest/create-order.cy.js @@ -16,11 +16,11 @@ describe('REST API order calculations', () => { }; // Clear out any auth cookies to avoid 401s. - cy.clearCookies(); - - cy.request(requestOptions).then((response) => { - expect(response.status).to.eq(201); - expect(parseFloat(response.body.total_tax)).to.be.gt(0); + cy.clearCookies().then(() => { + cy.request(requestOptions).then((response) => { + expect(response.status).to.eq(201); + expect(parseFloat(response.body.total_tax)).to.be.gt(0); + }); }); }); }); diff --git a/includes/class-simplesalestax.php b/includes/class-simplesalestax.php index 9a0bfe93..3a06028d 100644 --- a/includes/class-simplesalestax.php +++ b/includes/class-simplesalestax.php @@ -20,7 +20,7 @@ final class SimpleSalesTax { * * @var string */ - public $version = '7.0.2'; + public $version = '7.0.3'; /** * The singleton plugin instance. diff --git a/includes/class-sst-certificates.php b/includes/class-sst-certificates.php index af224161..a7503745 100644 --- a/includes/class-sst-certificates.php +++ b/includes/class-sst-certificates.php @@ -166,6 +166,16 @@ public static function get_certificates_formatted( $user_id = 0 ) { $certificates[ $id ] = self::format_certificate( $raw_cert ); } + // Sort by created date ascending. + uasort( $certificates, function( $cert_a, $cert_b ) { + $date_a = $cert_a['CreatedDate']; + $date_b = $cert_b['CreatedDate']; + if ( $date_a === $date_b ) { + return 0; + } + return $date_a < $date_b ? -1 : 1; + } ); + return $certificates; } diff --git a/languages/simple-sales-tax.pot b/languages/simple-sales-tax.pot index dad7baf6..40ac302c 100644 --- a/languages/simple-sales-tax.pot +++ b/languages/simple-sales-tax.pot @@ -2,9 +2,9 @@ # This file is distributed under the same license as the Simple Sales Tax package. msgid "" msgstr "" -"Project-Id-Version: Simple Sales Tax 7.0.2\n" +"Project-Id-Version: Simple Sales Tax 7.0.3\n" "Report-Msgid-Bugs-To: https://github.com/bporcelli/simplesalestax/issues\n" -"POT-Creation-Date: 2022-10-14 15:29:54+00:00\n" +"POT-Creation-Date: 2022-11-02 14:20:28+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/package-lock.json b/package-lock.json index f93eedb4..e7a6833c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "simplesalestax", - "version": "7.0.2", + "version": "7.0.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 604b3770..6006f77a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simplesalestax", - "version": "7.0.2", + "version": "7.0.3", "description": "A TaxCloud integration for WooCommerce.", "scripts": { "build": "grunt", diff --git a/readme.txt b/readme.txt index 7482b640..29806b6d 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: taxcloud, bporcelli Tags: woocommerce, taxcloud, tax, taxes, sales tax, tax calculation, sales tax compliance, sales tax filing, sales tax reporting Requires at least: 4.5 Tested up to: 6.1 -Stable tag: 7.0.2 +Stable tag: 7.0.3 Requires PHP: 5.5 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html diff --git a/simple-sales-tax.php b/simple-sales-tax.php index 4931d9e8..1b6e7944 100644 --- a/simple-sales-tax.php +++ b/simple-sales-tax.php @@ -6,14 +6,14 @@ * Author: TaxCloud * Author URI: https://taxcloud.com * GitHub Plugin URI: https://github.com/bporcelli/simplesalestax - * Version: 7.0.2 + * Version: 7.0.3 * Text Domain: simple-sales-tax * Domain Path: /languages/ * * Requires at least: 4.5.0 * Tested up to: 6.1.0 * WC requires at least: 3.0.0 - * WC tested up to: 7.0.0 + * WC tested up to: 7.1.0 * * @category Plugin * @copyright Copyright © 2022 The Federal Tax Authority, LLC