Skip to content

Conversation

@mattsherman
Copy link
Contributor

@mattsherman mattsherman commented Jul 18, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR restores the woocommerce_variations_added jQuery trigger that third-party extensions may depend on.

The e2e tests have also been updated to verify that this trigger is fired when a variation is manually added.

Closes #39291.

WooCommerce 7.8/7.9 (incorrect)

Screenshot 2023-07-18 at 3 59 34 pm

WooCommerce 7.7 (correct)

Variable subscription - 7 7

This PR (correct)

Variable subscription - fix

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Install WooCommerce Subscriptions plugin
  2. Create a new variable subscription product
    • Product > Add New
    • Product type: "Variable subscription"
  3. Add an attribute "used for variations" to the product
    • Attributes tab
  4. Create a variation manually
    • Variations tab
  5. Verify that the correct fields are shown for the variation
  6. Also use "Generate variations" and ensure the correct fields are shown

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement

Message

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jul 18, 2023
@mattsherman mattsherman added Bug The issue is a confirmed bug. Product/Inventory Management Issues related to product or product page. focus: product management [team:Mothra] labels Jul 18, 2023
@mattsherman mattsherman self-assigned this Jul 18, 2023
@mattsherman mattsherman changed the title Fix/variations added trigger Restore the woocommerce_variations_added jQuery trigger Jul 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

Test Results Summary

Commit SHA: 6bfe603

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 55s
E2E Tests1890019020814m 6s

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.

@mattsherman mattsherman marked this pull request as ready for review July 18, 2023 14:21
@mattsherman mattsherman requested review from a team, james-allan and mattallan July 18, 2023 14:21
@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

Hi @mattallan, @james-allan, @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@github-actions github-actions bot added the focus: e2e tests Issues related to e2e tests label Jul 18, 2023
@mattsherman
Copy link
Contributor Author

I've updated the e2e test to verify that the woocommerce_variations_added jQuery trigger is called.

Copy link
Contributor

@mattallan mattallan left a comment

Choose a reason for hiding this comment

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

Thanks @mattsherman thanks for the quick fix and for updating the tests to look out for this trigger being accidentally removed in the future.

I've tested this change and confirmed it fixes the issues we were facing in WC Subscriptions. Happy for this to be merged :)

@mattsherman mattsherman merged commit 5b412c4 into trunk Jul 19, 2023
@mattsherman mattsherman deleted the fix/variations_added_trigger branch July 19, 2023 02:15
@github-actions github-actions bot added this to the 8.1.0 milestone Jul 19, 2023
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jul 19, 2023
@alopezari alopezari added needs: analysis Indicates if the PR requires a PR testing scrub session. and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jul 19, 2023
@nigeljamesstevenson nigeljamesstevenson added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. needs: internal testing Indicates if the PR requires further testing conducted by Solaris labels Jul 19, 2023
@jonathansadowski jonathansadowski removed this from the 8.1.0 milestone Jul 19, 2023
@jonathansadowski jonathansadowski added this to the 8.0.0 milestone Jul 19, 2023
github-actions bot pushed a commit that referenced this pull request Jul 19, 2023
* Restore woocommerce_variations_added trigger

* Add e2e expect to verify that woocommerce_variations_added_functions jQuery trigger was called
jonathansadowski pushed a commit that referenced this pull request Jul 19, 2023
* Restore the woocommerce_variations_added jQuery trigger (#39301)

* Restore woocommerce_variations_added trigger

* Add e2e expect to verify that woocommerce_variations_added_functions jQuery trigger was called

* Prep for cherry pick 39301

---------

Co-authored-by: Matt Sherman <[email protected]>
Co-authored-by: WooCommerce Bot <[email protected]>
tommyshellberg pushed a commit that referenced this pull request Aug 7, 2023
* Restore woocommerce_variations_added trigger

* Add e2e expect to verify that woocommerce_variations_added_functions jQuery trigger was called
@nigeljamesstevenson nigeljamesstevenson added the status: analysis complete Indicates if a PR has been analysed by Solaris label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug The issue is a confirmed bug. focus: e2e tests Issues related to e2e tests needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. Product/Inventory Management Issues related to product or product page. status: analysis complete Indicates if a PR has been analysed by Solaris

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding variation manually loads all custom plugin product fields including those not relevant to the product type

6 participants