Skip to content

Conversation

@louwie17
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Updates the ShippingLabelBanner class to only run add_meta_boxes action when on a shop_order page. I also updated the Jetpack connected function call as is_active() has be deprecated for quite some time and this meta box only gets shown if Jetpack is on the latest version.

Closes #35211 .

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

We should check if the banner still shows, it would look like this:
Screen Shot 2022-10-20 at 12 13 58 PM

  1. The easiest would be to load up a Jurassic site with a zip of this branch: pnpm --filter=woocommerce build:zip, unless you have a local version of WooCommerce setup with a connected Jetpack site.
  2. Make sure your store is in the USA and the currency is USD, if you click the Personalize your store task you can add sample products (which will include shippable products)
  3. Create an order with a shippable product (ex: Hoodie)
  4. The banner should show up if you are on the edit order page and these criteria are met:
  • Jetpack is up to date and you are connected (this includes the user being connected)
  • None of the UPS, Fedex, ShippingEasy, or ShipStation shipping plugins are installed
  • Your store is in the USA and the currency is USD
  • WooCommerce Shipping is not installed or it is installed but the Terms of Service hasn't been accepted (probably easier to just not have it installed)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@louwie17 louwie17 requested a review from a team October 20, 2022 15:27
@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Oct 20, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2022

Test Results Summary

Commit SHA: fd5a809

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests23200302350m 48s
E2E Tests186006019217m 18s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@octaedro octaedro requested review from octaedro and removed request for a team October 28, 2022 17:18
octaedro
octaedro previously approved these changes Oct 28, 2022
Copy link
Contributor

@octaedro octaedro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job @louwie17! LGTM 🚢

@louwie17 louwie17 force-pushed the fix/35211_shipping_label_banner_add_meta_boxes_function branch from 71d4319 to fd5a809 Compare October 28, 2022 19:01
Copy link
Contributor

@octaedro octaedro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@louwie17 louwie17 merged commit 8740a8a into trunk Oct 28, 2022
@louwie17 louwie17 deleted the fix/35211_shipping_label_banner_add_meta_boxes_function branch October 28, 2022 20:08
@github-actions github-actions bot added this to the 7.2.0 milestone Oct 28, 2022
@github-actions
Copy link
Contributor

Hi @louwie17, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShippingLabelBanner::add_meta_boxes should check if on order page

3 participants