diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ffe813..d31d5ba 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Changelog +### 2.0.2 10.29.2024 +* Fixed - Conditionals that were causing blank archive pages. + ### 2.0.1 10.29.2024 * Fixed - Optimize tax queries being added to the main query. diff --git a/includes/class-dp-discontinued-product.php b/includes/class-dp-discontinued-product.php index 4e10fcb..b9e6722 100644 --- a/includes/class-dp-discontinued-product.php +++ b/includes/class-dp-discontinued-product.php @@ -274,7 +274,7 @@ public function build_tax_query( $q ) { $tax_queries = $q->get( 'tax_query' ); $tax_queries = is_array( $tax_queries ) ? $tax_queries : array(); - if ( $this->current_page_id === $dc_shop_page_id ) { + if ( $this->current_page_id && $dc_shop_page_id && $dc_shop_page_id === $this->current_page_id ) { $tax_queries[] = array( 'taxonomy' => 'product_discontinued', 'field' => 'slug', diff --git a/readme.md b/readme.md index 1e1a320..d1e20cc 100755 --- a/readme.md +++ b/readme.md @@ -6,7 +6,7 @@ **Tags:** woocommerce, woocommerce products, discontinued products, discontinued, ecommerce **Requires at least:** 6.0 **Tested up to:** 6.6.2 -**Stable tag:** 2.0.1 +**Stable tag:** 2.0.2 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html diff --git a/woocommerce-discontinued-products.php b/woocommerce-discontinued-products.php index c607c98..90bf7e7 100644 --- a/woocommerce-discontinued-products.php +++ b/woocommerce-discontinued-products.php @@ -5,7 +5,7 @@ * Description: Enables WooCommerce Discontinued Products. * Author: Leon @ 211J * Author URI: http://211j.com/ - * Version: 2.0.1 + * Version: 2.0.2 * Text Domain: discontinued-products * Domain Path: /languages