Skip to content

Commit 0f5157e

Browse files
committed
Fix: POS Only Products appearing in the web store
1 parent 4bb69cf commit 0f5157e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

includes/Products.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function product_set_stock( WC_Product $product ): void {
7777
* @return string
7878
*/
7979
public function hide_pos_only_products( $query ) {
80-
// Ensure this only runs for the main WooCommerce queries on product-related pages
81-
if ( ! is_admin() && $query->is_main_query() && ( is_shop() || is_product() || is_post_type_archive( 'product' ) || is_product_taxonomy() ) ) {
80+
// Ensure this only runs for the main WooCommerce queries on product-related queries
81+
if ( ! is_admin() && 'product' === $query->get( 'post_type' ) ) {
8282

8383
$settings_instance = Settings::instance();
8484
$settings = $settings_instance->get_pos_only_product_visibility_settings();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wcpos/woocommerce-pos",
3-
"version": "1.6.4",
3+
"version": "1.6.5",
44
"description": "A simple front-end for taking WooCommerce orders at the Point of Sale.",
55
"main": "index.js",
66
"workspaces": {

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: kilbot
33
Tags: ecommerce, point-of-sale, pos, inventory, woocommerce
44
Requires at least: 5.6
55
Tested up to: 6.5
6-
Stable tag: 1.6.4
6+
Stable tag: 1.6.5
77
License: GPL-3.0
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -80,6 +80,9 @@ There is more information on our website at [https://wcpos.com](https://wcpos.co
8080

8181
== Changelog ==
8282

83+
= 1.6.5 - 2024/09/04 =
84+
* Fix: POS Only Products appearing in the web store
85+
8386
= 1.6.4 - 2024/09/04 =
8487
* Fix: POS Only Products appearing in the web store
8588
* Fix: Disable wp_footer for POS Order Pay template

woocommerce-pos.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce POS
44
* Plugin URI: https://wordpress.org/plugins/woocommerce-pos/
55
* Description: A simple front-end for taking WooCommerce orders at the Point of Sale. Requires <a href="http://wordpress.org/plugins/woocommerce/">WooCommerce</a>.
6-
* Version: 1.6.4
6+
* Version: 1.6.5
77
* Author: kilbot
88
* Author URI: http://wcpos.com
99
* Text Domain: woocommerce-pos
@@ -24,7 +24,7 @@
2424
namespace WCPOS\WooCommercePOS;
2525

2626
// Define plugin constants.
27-
const VERSION = '1.6.4';
27+
const VERSION = '1.6.5';
2828
const PLUGIN_NAME = 'woocommerce-pos';
2929
const SHORT_NAME = 'wcpos';
3030
\define( __NAMESPACE__ . '\PLUGIN_FILE', plugin_basename( __FILE__ ) ); // 'woocommerce-pos/woocommerce-pos.php'

0 commit comments

Comments
 (0)