woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.42k stars 10.77k forks source link

[3.6.0] Add products popup on manual orders doesn't find any products #22992

Closed madeincosmos closed 5 years ago

madeincosmos commented 5 years ago

Describe the bug When using latest master, I'm unable to add any product as a line item on a manual order. Every search term gives me a 'no matches found'.

On 3.5.6 I am able to find products, but all of them show status In stock even if they're out of stock.

To Reproduce Steps to reproduce the behavior:

SCENARIO A - latest master:

  1. Go to Orders > Add new,
  2. Click on Add Items > Add Products,
  3. Enter any product name and observe the result is always 'no matches found'.

SCENARIO B - 3.5.6:

  1. Under WooCommerce > Settings > Products > Inventory set Never show quantity remaining in stock,
  2. Create a product with 0 stock,
  3. Go to Orders > Add new,
  4. Click on Add Items > Add Products,
  5. Enter product name or SKU and observe it shows as 'In stock'.

Screenshots

master - 'No matches found' returned for every query:

Screenshot Screenshot: https://cld.wthms.co/5zMUXX

3.5.6 - showing 'In stock' status even if the product is out of stock:

Screenshot Screenshot: https://cld.wthms.co/d39NZv

Expected behavior Products added in the store show correctly in search results. Those that have stock

Isolating the problem (mark completed items with an [x]):

WordPress Environment

``` ### WordPress Environment ### WordPress address (URL): http://wootest-clone.local Site address (URL): http://wootest-clone.local WC Version: 3.6.0 Log Directory Writable: ✔ WP Version: 5.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: – ### Server Environment ### Server Info: nginx/1.10.1 PHP Version: 7.0.3 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version PHP Post Max Size: 1,000 MB PHP Time Limit: 900 PHP Max Input Vars: 3000 cURL Version: 7.38.0 OpenSSL/1.0.1t SUHOSIN Installed: – MySQL Version: ❌ 5.5.60-0+deb8u1 - We recommend a minimum MySQL version of 5.6. See: WordPress requirements Max Upload Size: 1,000 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 3.6.0 WC Database Prefix: wp_ Total Database Size: 26.22MB Database Data Size: 17.26MB Database Index Size: 8.96MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.03MB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB wp_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB wp_woocommerce_order_itemmeta: Data: 0.28MB + Index: 0.28MB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB wp_advanced_notifications: Data: 0.02MB + Index: 0.00MB wp_advanced_notification_triggers: Data: 0.02MB + Index: 0.00MB wp_commentmeta: Data: 0.02MB + Index: 0.03MB wp_comments: Data: 0.28MB + Index: 0.30MB wp_followup_coupons: Data: 0.02MB + Index: 0.03MB wp_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB wp_followup_customers: Data: 0.02MB + Index: 0.06MB wp_followup_customer_carts: Data: 0.02MB + Index: 0.03MB wp_followup_customer_notes: Data: 0.02MB + Index: 0.03MB wp_followup_customer_orders: Data: 0.02MB + Index: 0.02MB wp_followup_email_coupons: Data: 0.02MB + Index: 0.02MB wp_followup_email_excludes: Data: 0.02MB + Index: 0.05MB wp_followup_email_logs: Data: 0.02MB + Index: 0.05MB wp_followup_email_orders: Data: 1.52MB + Index: 0.47MB wp_followup_email_order_coupons: Data: 0.02MB + Index: 0.02MB wp_followup_email_tracking: Data: 0.02MB + Index: 0.08MB wp_followup_followup_history: Data: 0.05MB + Index: 0.05MB wp_followup_order_categories: Data: 0.02MB + Index: 0.03MB wp_followup_order_items: Data: 0.02MB + Index: 0.05MB wp_followup_subscribers: Data: 0.02MB + Index: 0.03MB wp_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB wp_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB wp_links: Data: 0.02MB + Index: 0.02MB wp_ms_snippets: Data: 0.02MB + Index: 0.00MB wp_options: Data: 3.23MB + Index: 0.11MB wp_postmeta: Data: 6.52MB + Index: 5.92MB wp_posts: Data: 1.50MB + Index: 0.33MB wp_snippets: Data: 0.02MB + Index: 0.00MB wp_termmeta: Data: 0.02MB + Index: 0.03MB wp_terms: Data: 0.05MB + Index: 0.03MB wp_term_relationships: Data: 0.16MB + Index: 0.13MB wp_term_taxonomy: Data: 0.05MB + Index: 0.03MB wp_usermeta: Data: 0.06MB + Index: 0.03MB wp_users: Data: 0.02MB + Index: 0.05MB wp_wcpv_commissions: Data: 0.02MB + Index: 0.00MB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB wp_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB wp_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB wp_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB wp_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB wp_woocommerce_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB wp_woocommerce_subscription_downloads: Data: 0.02MB + Index: 0.00MB wp_wpml_mails: Data: 2.52MB + Index: 0.00MB ### Post Type Counts ### attachment: 121 bookable_person: 9 bookable_resource: 21 course: 1 customize_changeset: 2 event_ticket: 6 follow_up_email: 4 global_product_addon: 1 lesson: 5 order_shipment: 3 page: 17 polylang_mo: 2 post: 4 product: 430 product_variation: 438 question: 3 quiz: 5 revision: 15 scheduled-action: 118 shipping_package: 2 shop_coupon: 5 shop_order: 190 shop_order_refund: 6 shop_subscription: 15 wc_booking: 52 wc_membership_plan: 1 wc_order_status: 7 wc_user_membership: 2 wcpf_item: 4 wcpf_project: 1 ### Security ### Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ✔ ### Active Plugins (2) ### Easy Theme and Plugin Upgrades: by Chris Jean – 2.0.1 WooCommerce: by Automattic – 3.6.0-dev ### Inactive Plugins (89) ### Add missing non-subscription downloads for WooCommerce: by Maria Gorska – 0.1.0 – Not tested with the active version of WooCommerce Add missing subscription downloads for WooCommerce: by Maria Gorska – 0.1.0 – Not tested with the active version of WooCommerce Auto Add or Renew Membership for WooCommerce: by Maria Gorska – 1.0.0 – Not tested with the active version of WooCommerce Bookings Helper: by WooCommerce – 1.0.0 – Not tested with the active version of WooCommerce Change Return to Shop Link for WooCommerce: by Maria Gorska – 1.0.0 – Not tested with the active version of WooCommerce Customer Reward Coupons for WooCommerce: by Caleb Burks – 1.0 – Not tested with the active version of WooCommerce Fix Amazon Links for WooCommerce Amazon S3 storage: by Maria Gorska – 0.1.0 – Not tested with the active version of WooCommerce Follow-Up Emails: by WooCommerce – 4.8.7 – Not tested with the active version of WooCommerce Functionality: by Shea Bunge – 2.0.0 Jetpack by WordPress.com: by Automattic – 6.5 Loco Translate: by Tim Whitlock – 2.1.4 Polylang for WooCommerce: by Frédéric Demarle – 0.9 – Not tested with the active version of WooCommerce Polylang Pro: by Frédéric Demarle – 2.2.3 Product Filters for WooCommerce: by WooCommerce – 1.1.5 – Not tested with the active version of WooCommerce Query Monitor: by John Blackbourn & contributors – 3.2.2 Simply Show Hooks: by Stuart O'Brien cxThemes – 1.2.1 Storefront Powerpack: by WooCommerce – 1.4.9 Storefront Product Hero: by WooThemes – 1.2.13 WooCommerce - ShipStation Integration: by WooCommerce – 4.1.19 – Not tested with the active version of WooCommerce WooCommerce 2Checkout - Inline Checkout: by WooCommerce – 1.1.12 – Not tested with the active version of WooCommerce WooCommerce 2Checkout API Gateway: by WooCommerce – 1.0.5 – Not tested with the active version of WooCommerce WooCommerce 360° Image: by WooCommerce – 1.1.7 – Not tested with the active version of WooCommerce WooCommerce Accommodation Bookings: by WooCommerce – 1.1.5 – Not tested with the active version of WooCommerce WooCommerce Additional Variation Images: by WooCommerce – 1.7.14 – Not tested with the active version of WooCommerce WooCommerce Advanced Ajax Layered Navigation: by WooCommerce – 1.4.11 – Not tested with the active version of WooCommerce WooCommerce Advanced Notifications: by WooCommerce – 1.2.15 – Not tested with the active version of WooCommerce WooCommerce Advanced Shipping Packages: by Jeroen Sormani – 1.1.5 – Not tested with the active version of WooCommerce WooCommerce Amazon Pay Gateway: by WooCommerce – 1.9.0 – Not tested with the active version of WooCommerce WooCommerce Authorize.net DPM Gateway: by WooCommerce – 1.7.6 – Not tested with the active version of WooCommerce WooCommerce AvaTax: by SkyVerge – 1.6.6 – Not tested with the active version of WooCommerce WooCommerce Bookings: by Automattic – 1.13.2 – Not tested with the active version of WooCommerce WooCommerce Box Office: by WooCommerce – 1.1.11 – Not tested with the active version of WooCommerce WooCommerce Brands: by WooCommerce – 1.6.0 – Not tested with the active version of WooCommerce WooCommerce Bulk Download: by WooCommerce – 1.2.10 – Not tested with the active version of WooCommerce WooCommerce Bulk Stock Management: by WooCommerce – 2.2.14 – Not tested with the active version of WooCommerce WooCommerce Checkout Field Editor: by WooCommerce – 1.5.17 – Not tested with the active version of WooCommerce WooCommerce Deposits: by Automattic – 1.4.4 – Not tested with the active version of WooCommerce WooCommerce Distance Rate Shipping: by Automattic – 1.0.9 – Not tested with the active version of WooCommerce WooCommerce Drip: by WooCommerce – 1.2.10 – Not tested with the active version of WooCommerce WooCommerce EU VAT Number: by WooCommerce – 2.3.6 – Not tested with the active version of WooCommerce WooCommerce eWAY Payment Gateway: by WooCommerce – 3.1.16 – Not tested with the active version of WooCommerce WooCommerce FedEx Shipping: by WooCommerce – 3.4.13 – Not tested with the active version of WooCommerce WooCommerce FirstData UK Gateway: by WooCommerce – 1.1.6 – Not tested with the active version of WooCommerce WooCommerce Force Sells: by WooCommerce – 1.1.17 – Not tested with the active version of WooCommerce WooCommerce GoCardless Gateway: by WooCommerce – 2.4.10 – Not tested with the active version of WooCommerce WooCommerce Google Analytics Integration: by WooCommerce – 1.4.4 – Not tested with the active version of WooCommerce WooCommerce Google Product Feed: by Ademti Software Ltd. – 7.5.0 – Not tested with the active version of WooCommerce WooCommerce Help Scout: by WooCommerce – 1.3.9 – Not tested with the active version of WooCommerce WooCommerce Min/Max Quantities: by WooCommerce – 2.4.5 – Not tested with the active version of WooCommerce WooCommerce Mix and Match: by Kathy Darling – 1.3.3 – Not tested with the active version of WooCommerce WooCommerce Multi-currency: by WooCommerce – 1.12.0 – Not tested with the active version of WooCommerce WooCommerce MyGate Gateway: by WooCommerce – 1.2.11 – Not tested with the active version of WooCommerce WooCommerce One Page Checkout: by Prospress Inc. – 1.6.0 – Not tested with the active version of WooCommerce WooCommerce Order Barcodes: by Automattic – 1.3.4 – Not tested with the active version of WooCommerce WooCommerce Order Status Manager: by SkyVerge – 1.9.2 – Not tested with the active version of WooCommerce WooCommerce PayFast Gateway: by WooCommerce – 1.4.9 – Not tested with the active version of WooCommerce WooCommerce PayPal Checkout Gateway: by WooCommerce – 1.6.5 – Not tested with the active version of WooCommerce WooCommerce PayPal Powered by Braintree Gateway: by WooCommerce – 2.2.1 – Not tested with the active version of WooCommerce WooCommerce PayPal Pro (Classic and PayFlow Editions) Gateway: by WooCommerce – 4.4.12 – Not tested with the active version of WooCommerce WooCommerce PayPal Pro Hosted: by WooCommerce – 1.0.15 – Not tested with the active version of WooCommerce WooCommerce PDF Watermark: by WooCommerce – 1.1.4 – Not tested with the active version of WooCommerce WooCommerce Photography: by WooCommerce – 1.0.15 – Not tested with the active version of WooCommerce WooCommerce Points and Rewards: by WooCommerce – 1.6.17 – Not tested with the active version of WooCommerce WooCommerce Pre-Orders: by WooCommerce – 1.5.11 – Not tested with the active version of WooCommerce WooCommerce Product Add-ons: by WooCommerce – 3.0.8 – Not tested with the active version of WooCommerce WooCommerce Product CSV Import Suite: by WooCommerce – 1.10.21 – Not tested with the active version of WooCommerce WooCommerce Product Vendors: by WooCommerce – 2.1.14 – Not tested with the active version of WooCommerce WooCommerce Purchase Order Payment Gateway: by WooCommerce – 1.2.1 – Not tested with the active version of WooCommerce WooCommerce Purolator: by WooCommerce – 2.4.7 – Not tested with the active version of WooCommerce WooCommerce Review for Discount: by WooCommerce – 1.6.6 – Not tested with the active version of WooCommerce WooCommerce Royal Mail: by WooCommerce – 2.5.11 – Not tested with the active version of WooCommerce WooCommerce Services: by Automattic – 1.15.0 – Not tested with the active version of WooCommerce WooCommerce Servired/RedSys Spain Gateway: by José Conti – 4.4.2 – Not tested with the active version of WooCommerce WooCommerce Shipment Tracking: by WooCommerce – 1.6.12 – Not tested with the active version of WooCommerce WooCommerce Shipping Per Product v2: by WooCommerce – 2.2.15 – Not tested with the active version of WooCommerce WooCommerce Ship to Multiple Addresses: by WooCommerce – 3.6.5 – Not tested with the active version of WooCommerce WooCommerce Smart Coupons: by StoreApps – 4.0.0 – Not tested with the active version of WooCommerce WooCommerce Square: by WooCommerce – 1.0.35 – Not tested with the active version of WooCommerce WooCommerce Stamps.com API integration: by WooCommerce – 1.3.6 – Not tested with the active version of WooCommerce WooCommerce Stripe Gateway: by WooCommerce – 4.1.14 – Not tested with the active version of WooCommerce WooCommerce Subscription Downloads: by WooCommerce – 1.1.16 – Not tested with the active version of WooCommerce WooCommerce Subscriptions: by Prospress Inc. – 2.5.2 – Not tested with the active version of WooCommerce WooCommerce Table Rate Shipping: by WooCommerce – 3.0.13 – Not tested with the active version of WooCommerce WooCommerce UPS Shipping: by WooCommerce – 3.2.14 – Not tested with the active version of WooCommerce WooCommerce USPS Shipping: by WooCommerce – 4.4.15 – Not tested with the active version of WooCommerce WooCommerce Xero Integration: by WooCommerce – 1.7.16 – Not tested with the active version of WooCommerce wootest: by madeincosmos – 2019.02.14 WP Crontrol: by John Blackbourn & contributors – 1.6.2 WP Mail Logging: by Christian Zöller – 1.8.5 ### Settings ### API Enabled: ✔ Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: accommodation-booking (accommodation-booking) booking (booking) external (external) grouped (grouped) mix and match (mix-and-match) photography (photography) 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: #9 - /shop/ Cart: #10 - /cart/ Checkout: #11 - /checkout/ My account: #12 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Twenty Seventeen Version: 2.1 Author URL: https://wordpress.org/ 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: – ```
mikejolley commented 5 years ago

@madeincosmos Need to update database to 3.6 again if you're syncing from github. De-activate/re-activate WC to get the tables installed, then in system > status tools, regenerate product lookup tables. Give it a while to run then test again.

mikejolley commented 5 years ago

SCENARIO A is what I said before. Switching the branch doesn't run the update logic. When you update to 3.6 proper, or run the tool, this works (confirmed).

Edit order ‹ Test — WordPress 2019-03-12 14-25-28

SCENARIO B is a bug.

mikejolley commented 5 years ago

See https://github.com/woocommerce/woocommerce/pull/22997