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

Best Selling Products block includes refunded orders #3470

Closed kosiew closed 3 years ago

kosiew commented 3 years ago

Describe the bug

The best selling products block includes products that are already refunded.

To reproduce

Steps to reproduce the behavior:

  1. Create a new Best Selling Product Screenshot if image does not load, please click on this link : https://d.pr/i/L4WuLk

  2. Sell lots of it in one order

  3. Check that it appears in best selling block Screenshot if image does not load, please click on this link : https://d.pr/i/FMHBSA

  4. Refund the order Screenshot if image does not load, please click on this link : https://d.pr/i/2VbHo2

  5. Check the best selling block page, it is still a best seller Screenshot if image does not load, please click on this link : https://d.pr/i/FMHBSA

Expected behavior

The best selling block should not include products that are refunded

Screenshots

If applicable, add screenshots to help explain your problem.

Enviroment

`

WordPress Environment

WordPress address (URL): https://wpstore101.wpcomstaging.com Site address (URL): https://wpstore101.wpcomstaging.com WC Version: 4.7.1 REST API Version: ✔ 4.7.1 WC Blocks Version: ✔ 3.6.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.6.3 Log Directory Writable: ✔ WP Version: 5.5.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: ✔

Server Environment

Server Info: nginx PHP Version: 7.3.24 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 7.73.0 OpenSSL/1.1.0l

SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.21-MariaDB-log Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 4.7.1 WC Database Prefix: wp_ Total Database Size: 18.62MB Database Data Size: 10.72MB Database Index Size: 7.90MB wp_woocommerce_sessions: Data: 0.14MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 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.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.19MB + Index: 0.16MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + 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: 0.11MB + Index: 0.11MB + 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: 0.08MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_abandoned_carts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_customers: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_automatewoo_customer_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_events: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_guests: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_automatewoo_guest_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_log_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_queue: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_queue_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_referrals: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_referral_advocate_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_automatewoo_referral_invites: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_cookie_info: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_customers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_followup_customer_carts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_followup_email_excludes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_email_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_email_orders: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_followup_email_tracking: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_followup_followup_history: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_order_categories: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_order_items: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_subscribers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_groups_capability: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_groups_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_group_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_capability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_groups_user_group: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mclean_refs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mclean_scan: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 2.06MB + Index: 1.06MB + Engine InnoDB wp_postmeta: Data: 1.52MB + Index: 2.39MB + Engine InnoDB wp_posts: Data: 0.34MB + Index: 0.13MB + Engine InnoDB wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.14MB + Index: 0.19MB + Engine InnoDB wp_terms: Data: 0.13MB + Index: 0.16MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_track_user_activity: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcpv_commissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availabilitymeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB + 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.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.41MB + Index: 0.59MB + 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_warranty_products: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_exported_csv_items: Data: 0.08MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_gc_activity: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_gc_cards: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpml_mails: Data: 3.52MB + Index: 0.00MB + Engine InnoDB

Post Type Counts

attachment: 66 aw_workflow: 2 bookable_resource: 70 custom_css: 1 customize_changeset: 13 follow_up_email: 1 global_product_addon: 2 jp_img_sitemap: 2 jp_sitemap: 2 jp_sitemap_master: 2 nav_menu_item: 14 oembed_cache: 2 order_shipment: 4 page: 20 post: 1 product: 85 product_variation: 88 qts_quote_request: 1 qts_scheduled_jobs: 3 revision: 33 shop_coupon: 7 shop_order: 85 shop_order_refund: 3 shop_subscription: 18 wc_booking: 19 wc_membership_plan: 2 wc_user_membership: 1 wcpf_item: 5 wcpf_project: 2

Security

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

Active Plugins (2)

Meks Quick Plugin Disabler: by Meks – 1.0 WooCommerce: by Automattic – 4.7.1

Inactive Plugins (98)

Advanced Product Quantity: by Addify – 1.0.6 Akismet Anti-Spam: by Automattic – 4.1.7 All-in-One WP Migration: by ServMask – 7.31 AMP: by AMP Project Contributors – 2.0.7 AutomateWoo: by WooCommerce – 5.0.3 – Installed version not tested with active version of WooCommerce 4.7.1 AutomateWoo - Refer A Friend Add-on: by WooCommerce – 2.5.6 – Installed version not tested with active version of WooCommerce 4.7.1 Bookings Helper: by WooCommerce – 1.0.3 – Installed version not tested with active version of WooCommerce 4.7.1 Braintree for WooCommerce Payment Gateway: by WooCommerce – 2.4.3 – Installed version not tested with active version of WooCommerce 4.7.1 Classic Editor: by WordPress Contributors – 1.6 CoBlocks: by GoDaddy – 2.5.3 Code Snippets: by Code Snippets Pro – 2.14.0 Disable Real MIME Check: by Sergey Biryukov – 1.0 Facebook for WooCommerce: by Facebook – 2.2.0 Follow-Up Emails: by WooCommerce – 4.9.8 – Installed version not tested with active version of WooCommerce 4.7.1 Free Gifts for WooCommerce: by FantasticPlugins – 5.6 – Installed version not tested with active version of WooCommerce 4.7.1 GDPR Cookies: by opmc – 1.1 Google Ads & Marketing by Kliken: by Kliken – 1.0.6 – Installed version not tested with active version of WooCommerce 4.7.1 Groups: by itthinx – 2.11.1 Gutenberg: by Gutenberg Team – 9.3.0 Hello Dolly: by Matt Mullenweg – 1.7.2 Homepage Control: by WooThemes – 2.0.3 Jetpack by WordPress.com: by Automattic – 9.1 Layout Grid: by Automattic – 1.3 Loco Translate: by Tim Whitlock – 2.4.6 Mailchimp for WooCommerce: by Mailchimp – 2.4.7 – Installed version not tested with active version of WooCommerce 4.7.1 Media Cleaner: by Jordy Meow – 6.0.9 Page Optimize: by Automattic – 0.5.1 Paywall for WooCommerce: by TIV.NET INC – 2.3.0 – Installed version not tested with active version of WooCommerce 4.7.1 Pressable Automated Migration: by Pressable – 4.35 Product Filters for WooCommerce: by WooCommerce – 1.2.2 (update to version 1.2.3 is available) – Installed version not tested with active version of WooCommerce 4.7.1 Query Monitor: by John Blackbourn – 3.6.5 Quote Request for WooCommerce: by FantasticPlugins – 1.5 – Installed version not tested with active version of WooCommerce 4.7.1 reCaptcha for WooCommerce: by I Thirteen Web Solution – 2.1 – Installed version not tested with active version of WooCommerce 4.7.1 Redirection: by John Godley – 4.9.2 Sensei LMS: by Automattic – 3.5.3 Storefront Blog Customiser: by WooCommerce – 1.3.0 Storefront Footer Bar: by WooThemes – 1.0.4 Storefront Hamburger Menu: by WooCommerce – 1.2.2 Storefront Mega Menus: by WooCommerce – 1.6.2 – Installed version not tested with active version of WooCommerce 4.7.1 Storefront Parallax Hero: by WooCommerce – 1.5.7 Storefront Powerpack: by WooCommerce – 1.5.0 Storefront Pricing Tables: by WooCommerce – 1.1.0 Storefront Product Sharing: by WooCommerce – 1.0.6 Storefront Reviews: by WooCommerce – 1.0.6 – Installed version not tested with active version of WooCommerce 4.7.1 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.16.40

User Role Editor: by Vladimir Garagulya – 4.57 WooCommerce Additional Variation Images: by WooCommerce – 1.7.26 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Admin: by WooCommerce – 1.7.2 WooCommerce Advanced Ajax Layered Navigation: by WooCommerce – 1.4.26 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Advanced Product Labels: by Jeroen Sormani – 1.1.7 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Advanced Shipping Packages: by Jeroen Sormani – 1.1.7 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce All Products For Subscriptions: by SomewhereWarm – 3.1.17 (update to version 3.1.19 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Amazon Pay: by WooCommerce – 1.12.2 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Blocks: by Automattic – 3.9.0 WooCommerce Bookings: by WooCommerce – 1.15.28 (update to version 1.15.31 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Brands: by WooCommerce – 1.6.20 (update to version 1.6.21 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Bulk Stock Management: by WooCommerce – 2.2.29 (update to version 2.2.31 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Cart Add-Ons: by WooCommerce – 1.15.32 (update to version 1.15.34 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Chained Products: by StoreApps – 2.9.6 (update to version 2.9.8 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Checkout Field Editor: by WooCommerce – 1.5.36 (update to version 1.5.38 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Composite Products: by SomewhereWarm – 7.1.2 (update to version 7.1.3 is available) WooCommerce Currency Converter: by WooCommerce – 1.6.23 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Customer/Order/Coupon Export: by SkyVerge – 5.1.2 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Custom Thank You Pages: by Jeroen Sormani – 1.0.2 (update to version 1.0.3 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Deposits: by WooCommerce – 1.5.4 (update to version 1.5.6 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Dynamic Pricing: by Lucas Stark – 3.1.21 (update to version 3.1.22 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce FedEx Shipping: by WooCommerce – 3.4.33 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Force Sells: by WooCommerce – 1.1.27 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Gift Cards: by SomewhereWarm – 1.5.0 (update to version 1.5.2 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Google Analytics Integration: by WooCommerce – 1.4.25 WooCommerce Memberships: by SkyVerge – 1.18.0 (update to version 1.19.2 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Min/Max Quantities: by WooCommerce – 2.4.20 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Mix and Match Products: by Kathy Darling – 1.10.0 (update to version 1.10.5 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Payments: by Automattic – 1.7.0 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.1 WooCommerce PDF Product Vouchers: by SkyVerge – 3.8.0 (update to version 3.8.1 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Points and Rewards: by WooCommerce – 1.6.38 (update to version 1.6.40 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Product Add-ons: by WooCommerce – 3.1.0 (update to version 3.2.0 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Product Bundles: by SomewhereWarm – 6.4.0 (update to version 6.6.0 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Product CSV Import Suite: by WooCommerce – 1.10.35 (update to version 1.10.38 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Product Vendors: by WooCommerce – 2.1.43 (update to version 2.1.44 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Shipping & Tax: by Automattic – 1.25.3 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Shipping Per Product v2: by WooCommerce – 2.3.12 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Ship to Multiple Addresses: by WooCommerce – 3.6.23 (update to version 3.6.24 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Smart Coupons: by StoreApps – 4.7.8 (update to version 4.12.2 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Stripe Gateway: by WooCommerce – 4.5.5 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Subscriptions: by WooCommerce – 3.0.10 (update to version 3.0.11 is available) WooCommerce Subscriptions Gifting: by WooCommerce – 2.1.1 (update to version 2.1.2 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Table Rate Shipping: by WooCommerce – 3.0.30 – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce UPS Shipping: by WooCommerce – 3.2.27 (update to version 3.2.29 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce USPS Shipping: by WooCommerce – 4.4.48 (update to version 4.4.49 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Warranty Requests: by WooCommerce – 1.9.18 (update to version 1.9.20 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WooCommerce Xero Integration: by WooCommerce – 1.7.32 (update to version 1.7.34 is available) – Installed version not tested with active version of WooCommerce 4.7.1 WordPress.com Editing Toolkit: by Automattic – 2.8.8 WP Crontrol: by John Blackbourn & crontributors – 1.8.5 WP Mail Logging: by MailPoet – 1.9.7 WP phpMyAdmin: by Puvox.software – 5.0.4.1 WP REST API: by WP REST API Team – 2.0-beta15

Dropin Plugins (2)

advanced-cache.php: advanced-cache.php object-cache.php: Memcached

Must Use Plugins (1)

WP.com Site Helper: by –

Settings

API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: booking (booking) bundle (bundle) composite (composite) external (external) grouped (grouped) mix and match (mix-and-match) paywall (paywall) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription)

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: ✔

WC Pages

Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #3843 - /checkout-page/ My account: #8 - /my-account/ Terms and conditions: ❌ Page not set

Theme

Name: Storefront Version: 2.7.0 (update to version 2.9.0 is available) Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: –

Action Scheduler

Canceled: 1 Oldest: -0001-11-30 00:00:00 +0000 Newest: -0001-11-30 00:00:00 +0000

Complete: 245 Oldest: 2020-10-27 01:53:06 +0000 Newest: 2020-11-27 01:36:49 +0000

Pending: 22 Oldest: 2020-11-27 01:41:42 +0000 Newest: 2021-08-27 09:05:35 +0000

`

Desktop (please complete the following information):

Additional context

Add any other context about the problem here.

nerrad commented 3 years ago

Thanks for leaving the report @kosiew - however this is currently expected behaviour by default because the results for the block are cached for 24 hours via a transient. So it's currently expected that the popular results will remain the same for the cache.

@mikejolley do you think we should hook into the saving of products (or in this case refund events) to clear any related caches set/used by the blocks?

kosiew commented 3 years ago

@nerrad ,

Thanks for taking a look at this.

I checked this 2 days after the above test and the refunded product is still included in the best selling block. Screenshot if image does not load, please click on this link : https://d.pr/i/YDV6OB

Aljullu commented 3 years ago

Thanks for the follow-up @kosiew, this issue seems to be a consequence of https://github.com/woocommerce/woocommerce/issues/23796 and it will need to be fixed in WooCommerce core.

I will close this issue since there is nothing actionable we can do in WC Blocks repo, but you can follow the issue in WooCommerce Core to track any development in that area.