Skip to content

Using the new tax status constants #4302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: dev/updating-the-min-wc-version-to-9.8
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Changelog ***

= 9.5.0 - xxxx-xx-xx =
* Dev - Implements WooCommerce constants for the tax statuses.
* Fix - Fixes the listing of payment methods on the classic checkout when the Optimized Checkout is enabled.
* Fix - Fixes the availability of WeChat Pay when the Optimized Checkout is enabled on the block checkout. Removes it from the classic/shortcode checkout to avoid issues.
* Dev - Renames all references to "Smart Checkout" and "Single Payment Element" (and "SPE") to "Optimized Checkout" (and "OC"), following the feature rebranding.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

use Automattic\WooCommerce\Enums\ProductTaxStatus;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
Expand Down Expand Up @@ -725,7 +727,7 @@ private function is_product_or_cart_taxable() {
if ( ! $product ) {
return false;
}
return $product->get_tax_status() !== 'none';
return $product->get_tax_status() !== ProductTaxStatus::NONE;
}

// Cart or checkout page: the cart is taxable if any item in the cart
Expand All @@ -742,7 +744,7 @@ private function is_product_or_cart_taxable() {
$cart_item_key
);

if ( 'none' !== $product->get_tax_status() ) {
if ( ProductTaxStatus::NONE !== $product->get_tax_status() ) {
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o

**Internal Changes and Upcoming Features**

* Dev - Implements WooCommerce constants for the tax statuses.
* Feature - Work to support Optimized Checkout
* Feature - Work to support Amazon Pay
* Dev - Splits the code coverage GitHub Actions Workflow into two separate actions
Expand Down
Loading