woocommerce / woocommerce-blocks

(Deprecated) This plugin has been merged into woocommerce/woocommerce
https://wordpress.org/plugins/woo-gutenberg-products-block/
GNU General Public License v3.0
404 stars 217 forks source link

'Filter Products by Stock' in Block widget stopped working in WC 7.8.0 #9949

Closed jrmain closed 1 year ago

jrmain commented 1 year ago

Prerequisites

Describe the bug

After upgrading WooCommerce from version 7.7.2 to version 7.8.0, WooCommerce 'Filter Products by Stock' in Block widget stopped working.

Nothing appears at all where previously 'In stock' and 'Out of stock' checkboxes appeared.

This is the contents of the Block, added as a widget in the WooCommerce Sidebar:
<!-- wp:woocommerce/stock-filter -->
<div class="wp-block-woocommerce-stock-filter is-loading" data-show-counts="false" data-heading="Filter by stock status" data-heading-level="3">
    <span aria-hidden="true" class="wc-block-product-stock-filter__placeholder"></span></div>
<!-- /wp:woocommerce/stock-filter -->

It was working perfectly before the update to 7.8.0. Switching to one of the canned themes didn't help. Disabling all but the WooCommerce plugin didn't help. Tried updating to 7.8.0 on a development site and the same thing happened. Reverted to WooCommerce 7.7.2 and 'Filter Products by Stock' reappeared.

Expected behavior

The 'Filter Products by Stock' filter should appear in the WooCommerce sidebar.

Actual behavior

The 'Filter Products by Stock' filter DOES NOT appear in the WooCommerce sidebar.

Steps to reproduce

  1. On a site running WooCommerce 7.7.2, add a Block widget to the WooCommerce sidebar, and paste into it the following:
    
    <!-- wp:woocommerce/stock-filter -->
    <div class="wp-block-woocommerce-stock-filter is-loading" data-show-counts="false" data-heading="Filter by stock status" data-heading-level="3">
    <span aria-hidden="true" class="wc-block-product-stock-filter__placeholder"></span></div>
    <!-- /wp:woocommerce/stock-filter -->

2. Confirm that the WooCommerce stock status filter appears in the Shop sidebar.
3. Upgrade WooCommerce to version 7.8.0.
4. The stock status filter is now gone.

### WordPress Environment ###

WordPress address (URL): https://internationalshootingsupplies.com
Site address (URL): https://internationalshootingsupplies.com
WC Version: 7.7.2
REST API Version: ✔ 7.7.2
WC Blocks Version: ✔ 10.0.6
Action Scheduler Version: ✔ 3.5.4
Log Directory Writable: ✔
WP Version: 6.2.2
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

### Server Environment ###

Server Info: Apache
PHP Version: 7.4.30
PHP Post Max Size: 512 MB
PHP Time Limit: 120
PHP Max Input Vars: 1000
cURL Version: 7.68.0
OpenSSL/1.1.1f

SUHOSIN Installed: –
MySQL Version: 8.0.28-0ubuntu0.20.04.3
Max Upload Size: 512 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

WC Database Version: 7.7.2
WC Database Prefix: wp_
Total Database Size: 242.02MB
Database Data Size: 192.90MB
Database Index Size: 49.12MB
wp_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.56MB + Index: 0.24MB + Engine MyISAM
wp_woocommerce_order_itemmeta: Data: 2.90MB + Index: 2.07MB + Engine MyISAM
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 1.02MB + Index: 1.42MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 2.20MB + Index: 2.86MB + Engine InnoDB
wp_bpspro_db_backup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bpspro_login_security: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_bpspro_mscan: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_bpspro_seclog_ignore: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
wp_comments: Data: 1.29MB + Index: 0.63MB + Engine MyISAM
wp_crony_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_crony_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_easywpsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_easywpsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_eemail_newsletter: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_eemail_newsletter_sub: Data: 0.02MB + Index: 0.01MB + Engine MyISAM
wp_faq_termmeta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_lrgawidget_global_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_ngg_album: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_ngg_gallery: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_ngg_pictures: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
wp_options: Data: 19.00MB + Index: 1.48MB + Engine MyISAM
wp_pmxe_exports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_pmxe_google_cats: Data: 0.39MB + Index: 0.00MB + Engine InnoDB
wp_pmxe_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_pmxe_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_postmeta: Data: 42.49MB + Index: 15.61MB + Engine MyISAM
wp_posts: Data: 33.66MB + Index: 3.02MB + Engine MyISAM
wp_revslider_css: Data: 0.09MB + Index: 0.01MB + Engine MyISAM
wp_revslider_css_bkp: Data: 0.09MB + Index: 0.00MB + Engine MyISAM
wp_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_layer_animations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_navigations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_settings: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_sliders: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_sliders_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_revslider_static_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_social_users: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_relationships: Data: 0.51MB + Index: 1.19MB + Engine MyISAM
wp_term_taxonomy: Data: 0.04MB + Index: 0.05MB + Engine MyISAM
wp_termmeta: Data: 0.10MB + Index: 0.10MB + Engine MyISAM
wp_terms: Data: 0.05MB + Index: 0.10MB + Engine MyISAM
wp_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_usermeta: Data: 10.43MB + Index: 6.71MB + Engine MyISAM
wp_users: Data: 0.93MB + Index: 0.91MB + Engine MyISAM
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 1.52MB + Index: 0.47MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.30MB + Index: 0.36MB + Engine InnoDB
wp_wc_order_stats: Data: 0.31MB + Index: 0.31MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.20MB + Index: 0.19MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.11MB + Index: 0.16MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.45MB + Index: 0.77MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfBlockedIPLog: Data: 0.13MB + Index: 0.09MB + Engine MyISAM
wp_wfBlocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wfConfig: Data: 4.49MB + Index: 0.01MB + Engine MyISAM
wp_wfCrawlers: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
wp_wfFileChanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfFileMods: Data: 4.17MB + Index: 0.51MB + Engine MyISAM
wp_wfHits: Data: 56.01MB + Index: 0.45MB + Engine MyISAM
wp_wfHoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfIssues: Data: 0.05MB + Index: 0.01MB + Engine MyISAM
wp_wfKnownFileList: Data: 3.52MB + Index: 0.00MB + Engine InnoDB
wp_wfLiveTrafficHuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfLocs: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
wp_wfLogins: Data: 0.59MB + Index: 0.11MB + Engine MyISAM
wp_wfNotifications: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wfPendingIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wfReverseCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wfSNIPCache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wfStatus: Data: 0.17MB + Index: 0.07MB + Engine MyISAM
wp_wfTrafficRates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfWafFailures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY
wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woo_custom_nav_menus: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woo_custom_nav_records: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_woo_debug: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wpf_filters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpf_meta_data: Data: 2.52MB + Index: 7.84MB + Engine InnoDB
wp_wpf_meta_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpf_meta_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wpf_meta_values_bk: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpf_modules: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpf_modules_type: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpf_usage_stat: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wps_bans: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wps_logins: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wps_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
wp_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_xsg_sitemap_meta: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
wp_yith_wcwl: Data: 0.16MB + Index: 0.09MB + Engine InnoDB
wp_yith_wcwl_lists: Data: 0.19MB + Index: 0.30MB + Engine MyISAM

### Post Type Counts ###

announcer: 3
attachment: 6747
contactform: 1
custom_css: 3
feedback: 5098
nav_menu_item: 1211
page: 16
popup: 4
popup_theme: 8
post: 10
postman_sent_mail: 250
product: 4225
revision: 2578
shop_order: 2930
wooframework: 356

### Security ###

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

### Active Plugins (23) ###

CAPTCHA 4WP: by WP White Security – 7.2.2
Akismet Anti-Spam: by Automattic – 5.1
Announcer: by Aakash Chakravarthy – 5.8
Astra Widgets: by Brainstorm Force – 1.2.12
Bellows Accordion Menu: by SevenSpark – 1.4.2
BBQ Firewall: by Jeff Starr – 20230303
BulletProof Security: by AITpro Website Security – 6.8
Classic Editor: by WordPress Contributors – 1.6.3
Classic Widgets: by WordPress Contributors – 0.3
Duplicate Menu: by Jonathan Christopher – 0.2.2
Easy WP SMTP: by Easy WP SMTP – 2.1.0
Hide WooCommerce Categories On Shop Page: by Matix Web Designers – 1.1.3
Jetpack: by Automattic – 12.2.1
Lara's Google Analytics (GA4): by XtraOrbit Web Development SRL – 4.0.1
Popup Maker: by Popup Maker – 1.18.1
Product Import Export for WooCommerce: by WebToffee – 2.3.1
Import Export WordPress Users and WooCommerce Customers: by WebToffee – 2.4.0
Widget Context: by Kaspars Dambis – 1.3.2
Open Graph and Twitter Card Tags: by WPExperts – 3.3.0
WooCommerce: by Automattic – 7.7.2 (update to version 7.8.0 is available)
Wordfence Security: by Wordfence – 7.9.3
XML Sitemap Generator for Google: by XmlSitemapGenerator.org – 2.0.7
YITH WooCommerce Wishlist: by YITH – 3.22.0

### Inactive Plugins (3) ###

Import and export users and customers: by codection – 1.22.4
Product Filter by WBW: by WBW – 2.3.7
WP-Optimize - Clean, Compress, Cache: by David Anderson
Ruhani Rabin
Team Updraft – 3.2.15

### Must Use Plugins (1) ###

BPS MU Tools: by AITpro – 9.0

### Settings ###

API Enabled: ✔
Force SSL: –
Currency: CAD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: –
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –

### WC Pages ###

Shop base: woocommerce/woocommerce#1930 - /shop/
Cart: woocommerce/woocommerce#1931 - /cart/
Checkout: woocommerce/woocommerce#1932 - /checkout/
My account: woocommerce/woocommerce#1933 - /my-account/
Terms and conditions: woocommerce/woocommerce#1944 - /terms-and-conditions/

### Theme ###

Name: Astra Child for ISS
Version: 1.0.0
Author URL: https://jrc-core.com
Child Theme: ✔
Parent Theme Name: Astra
Parent Theme Version: 4.1.5
Parent Theme Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
WooCommerce Support: ✔

### Templates ###

Overrides: –

### Admin ###

Enabled Features: activity-panels
analytics
coupons
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page

Disabled Features: product-block-editor
minified-js
new-product-management-experience
product-variation-management
settings

Daily Cron: ✔ Next scheduled: 2023-06-19 13:33:02 -07:00
Options: ✔
Notes: 47
Onboarding: completed

### Action Scheduler ###

Complete: 1,229
Oldest: 2023-05-18 09:56:43 -0700
Newest: 2023-06-18 06:32:36 -0700

Failed: 2
Oldest: 2021-08-22 20:29:44 -0700
Newest: 2023-06-18 06:09:43 -0700

Pending: 1
Oldest: 2023-06-18 14:42:40 -0700
Newest: 2023-06-18 14:42:40 -0700

### Status report information ###

Generated at: 2023-06-18 06:43:58 -07:00

### Isolating the problem

- [X] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
- [X] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
- [X] I can reproduce this bug consistently using the steps above.
opr commented 1 year ago

Hi @jrmain thanks for posting this. I've moved this issue to the WooCommerce Blocks repository.

Aljullu commented 1 year ago

Thanks for opening this issue, @jrmain! I'm able to reproduce, other filter blocks are affected as well. Ie, I tried inserting these blocks in a post:

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:woocommerce/price-filter -->
<div class="wp-block-woocommerce-price-filter is-loading" data-showinputfields="true" data-showfilterbutton="false" data-heading="Filter by price" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-categories__placeholder"></span></div>
<!-- /wp:woocommerce/price-filter -->

<!-- wp:woocommerce/attribute-filter {"attributeId":1,"displayStyle":"dropdown","heading":"Filter by Color"} -->
<div class="wp-block-woocommerce-attribute-filter is-loading" data-attribute-id="1" data-show-counts="true" data-query-type="or" data-heading="Filter by Color" data-heading-level="3" data-display-style="dropdown"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div>
<!-- /wp:woocommerce/attribute-filter -->

<!-- wp:woocommerce/attribute-filter {"attributeId":2,"heading":"Filter by Size"} -->
<div class="wp-block-woocommerce-attribute-filter is-loading" data-attribute-id="2" data-show-counts="true" data-query-type="or" data-heading="Filter by Size" data-heading-level="3"><span aria-hidden="true" class="wc-block-product-attribute-filter__placeholder"></span></div>
<!-- /wp:woocommerce/attribute-filter -->

<!-- wp:woocommerce/active-filters -->
<div class="wp-block-woocommerce-active-filters is-loading" data-display-style="list" data-heading="Active filters" data-heading-level="3"><span aria-hidden="true" class="wc-block-active-product-filters__placeholder"></span></div>
<!-- /wp:woocommerce/active-filters --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:woocommerce/all-products {"columns":3,"rows":3,"alignButtons":false,"contentVisibility":{"orderBy":true},"orderby":"date","layoutConfig":[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]]} -->
<div class="wp-block-woocommerce-all-products wc-block-all-products" data-attributes="{&quot;alignButtons&quot;:false,&quot;columns&quot;:3,&quot;contentVisibility&quot;:{&quot;orderBy&quot;:true},&quot;isPreview&quot;:false,&quot;layoutConfig&quot;:[[&quot;woocommerce/product-image&quot;],[&quot;woocommerce/product-title&quot;],[&quot;woocommerce/product-price&quot;],[&quot;woocommerce/product-rating&quot;],[&quot;woocommerce/product-button&quot;]],&quot;orderby&quot;:&quot;date&quot;,&quot;rows&quot;:3}"></div>
<!-- /wp:woocommerce/all-products --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

Filter blocks are visible in WC Blocks 10.2.1 but not in WC Blocks 10.2.2. This issue might be related to #9870.

Aljullu commented 1 year ago

Hi again, @jrmain. We are working on deploying a fix for this bug (you can follow the progress in https://github.com/woocommerce/woocommerce-blocks/pull/9954). In the meanwhile, and in order to fix it in your store, you can remove and add the Filter Products by Stock block again. This will add an updated version that renders properly.

And thanks again for reporting this issue, reports like this are super valuable in order to improve WooCommerce.

jrmain commented 1 year ago

in order to fix it in your store, you can remove and add the Filter Products by Stock block again. This will add an updated version that renders properly.

That won't work for the site in question, because we're using the classic editor and classic widgets. As reported, the Stock Status filter was added as a Block widget in the classic widget editor. I did try removing and re-adding the Block widget, but alas it didn't help.

As to why we're not using the block editor and block widgets, they just seem to have too many issues. The classic editors are much more straightforward and, in my opinion, easier to use.

jrmain commented 1 year ago

Given that the fix proposed here didn't work for us, are you sure that the change in #9954 will?

Aljullu commented 1 year ago

I can't speak with 100% certainty for your specific store, but I expect that the fix will work. I did test adding the Filter Products by Stock block via a Classic Widget and the fix worked as expected.

If you want to test it by yourself, there is a testing ZIP attached to the PR: https://github.com/woocommerce/woocommerce-blocks/pull/9954#issuecomment-1602445878. But it's a ZIP for testing purposes, so please don't use it in a production site. :pray:

~If getting the fix is really urgent, I would suggest installing the WC Blocks plugin, as the fix will be available there faster than in WC core.~ Update: it might be released in WC core first.

Hope that heps! :slightly_smiling_face:

jrmain commented 1 year ago

I can confirm that WooCommerce 7.8.1 fixes this problem.

Aljullu commented 1 year ago

Awesome, thanks for confirming, @jrmain!