Skip to content

Commit

Permalink
Fixed - Conditionals that were causing blank archive pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
twoelevenjay committed Oct 30, 2024
1 parent 372998d commit b124807
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion includes/class-dp-discontinued-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion woocommerce-discontinued-products.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b124807

Please sign in to comment.