Automattic / woocommerce-services

WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
GNU General Public License v2.0
107 stars 20 forks source link

Get the flag to display the migration banner from the connect server #2755

Closed Ferdev closed 3 months ago

Ferdev commented 3 months ago

Description

The Connect Server's endpoint POST /services includes a features.wcshippingtax_upgrade_banner property containing all the required info to display a banner with info about the migration to WooCommerce Shipping and WooCommerce Tax.

This PR leverages all control of enabling or disabling this banner to the Connect Server's new property mentioned above.

Related issue(s)

N/A

Steps to reproduce & screenshots/GIFs

  1. Checkout this branch in your local setup.
  2. Point the Connect Server to the staging instance: https://api-staging.woocommerce.com.
  3. Visit the orders page: http://localhost/wp-admin/admin.php?page=wc-orders.
  4. The banner should be displayed:

shot-2024-06-21-16-50-20

  1. Change the Server's endpoint to production.
  2. The banner should be no hidden after reloading the orders page, as it's not enabled in production yet.

Checklist

harriswong commented 3 months ago

👀 Driving by, going to help review this.