woocommerce / woocommerce

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

[GlobalStep] "Add store details" task fails to mark as completed for selecting Nigeria based address while OBW. #37451

Closed gglobalstep closed 1 year ago

gglobalstep commented 1 year ago

Prerequisites

Describe the bug

"Add store details" task fails to mark as completed for selecting Nigeria based address while OBW.

Expected behavior

"Add store details" task should be marked as completed for selecting Nigeria based address while OBW.

Actual behavior

"Add store details" task fails to mark as completed for selecting Nigeria based address while OBW.

Steps to reproduce

  1. Create any test site using the JN site or Atomic site.
  2. Install and activate all the required plugins.
  3. Install and activate WooCommerce 7.6 Beta.
  4. Start OBW.
  5. Select a Nigeria-based address.
  6. Finish OBW.
  7. Go to "Woocommerce > Home" page
  8. Observe that "Add store details" task fails to mark as completed.

Screenshot:

#37451

WordPress Environment

Woocommerce Version: WooCommerce 7.6.0-beta.1 WordPress version: 6.2-RC3

PC: Windows 10 Chrome(Version 111.0.5563.111) Firefox(Version 111.0.1)

Isolating the problem

` ### WordPress Environment ### WC Version: 7.6.0 REST API Version: ✔ 7.6.0 WC Blocks Version: ✔ 9.8.1 Action Scheduler Version: ✔ 3.5.4 Log Directory Writable: ✔ WP Version: 6.2-RC3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: ✔ ### Server Environment ### Server Info: nginx PHP Version: 8.0.28 PHP Post Max Size: 2 GB PHP Time Limit: 1200 PHP Max Input Vars: 6144 cURL Version: 7.86.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 10.6.12-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: 7.6.0 WC Database Prefix: wp_ Total Database Size: 23.53MB Database Data Size: 13.51MB Database Index Size: 10.02MB wp_woocommerce_sessions: Data: 0.06MB + 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.11MB + Index: 0.09MB + 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: 4.52MB + Index: 4.34MB + 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.52MB + Index: 3.03MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automation_runs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automation_run_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automation_run_subjects: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_automation_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automation_versions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscribers: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 0.19MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.25MB + Index: 0.19MB + Engine InnoDB wp_posts: Data: 0.14MB + Index: 0.06MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + 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_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + 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_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_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + 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_wpml_mails: Data: 1.52MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 32 mailpoet_page: 1 page: 11 post: 3 product: 22 product_variation: 11 revision: 7 shop_coupon: 4 shop_order: 37 shop_order_refund: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (4) ### Query Monitor: by John Blackbourn – 3.12.1 WooCommerce Beta Tester: by WooCommerce – 2.1.0 WooCommerce: by Automattic – 7.6.0-beta.1 WP Mail Logging: by WP Mail Logging Team – 1.11.0 ### Inactive Plugins (6) ### Akismet Anti-Spam: by Automattic – 5.1 Code Snippets: by Code Snippets Pro – 3.3.0 Gutenberg: by Gutenberg Team – 15.4.0 MailPoet: by MailPoet – 4.9.0 WooCommerce Payments: by Automattic – 5.6.2 WP Crontrol: by John Blackbourn & crontributors – 1.15.2 ### Dropin Plugins (3) ### advanced-cache.php: advanced-cache.php db.php: Query Monitor Database Class (Drop-in) object-cache.php: Memcached ### Settings ### API Enabled: – Force SSL: – Currency: NGN (₦) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) 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: ✔ Enforce Approved Product Download Directories: ✔ Order datastore: WC_Order_Data_Store_CPT ### WC Pages ### Shop base: #7 - /shop/ Cart: #8 - /cart/ Checkout: #9 - /checkout/ My account: #10 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Storefront Version: 4.2.0 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: – ### 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 multichannel-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: block-editor-feature-enabled minified-js new-product-management-experience product-variation-management settings Daily Cron: ✔ Next scheduled: 2023-03-28 09:01:41 +00:00 Options: ✔ Notes: 29 Onboarding: completed ### Action Scheduler ### Complete: 9,130 Oldest: 2023-03-27 09:01:42 +0000 Newest: 2023-03-27 15:08:52 +0000 Pending: 34 Oldest: 2023-03-27 15:09:05 +0000 Newest: 2023-03-28 09:02:45 +0000 Failed: 4 Oldest: 2023-03-27 09:03:47 +0000 Newest: 2023-03-27 14:53:00 +0000 Canceled: 3 Oldest: 2023-03-27 09:17:01 +0000 Newest: 2023-03-27 12:16:19 +0000 ### Status report information ### Generated at: 2023-03-27 15:09:31 +00:00 `
chihsuan commented 1 year ago

We discovered that the OBW doesn't display the Postal Code field for certain countries, such as Nigeria, because they don't actually use postal codes (https://github.com/woocommerce/woocommerce/issues/21055). (p1679982098441029/1679926954.465149-slack-C011ENB20Q1 )

Currently, the "Add store details" task is considered completed when the store address, city, and postal code are all set. We should account for whether or not countries require a postal code in the store details task. This information can be obtained from WC_Countries.

https://github.com/woocommerce/woocommerce/blob/deb1cde4480622e398dedafea6ba8565c59d67ca/plugins/woocommerce/includes/class-wc-countries.php#L795-L846