Removed duplicate self-executing anonymous function#12184
Removed duplicate self-executing anonymous function#12184jeherve merged 1 commit intoAutomattic:masterfrom
Conversation
By default `wc_enqueue_js` method comes with a built-in self-executing anonymous function which makes it unnecessary to write our own within the code. Reference can be found [here](https://github.com/woocommerce/woocommerce/blob/9206d6f4dd55df6cc45ea3982656cc8ec7690a76/includes/wc-core-functions.php#L859).
This is an automated check which relies on |
|
Thanks for the contribution. Could you add some testing instructions to your PR description, to make your PR easier to review? Thank you. |
|
@jeherve The PR removes the duplication of the following anonymous function from the front-end.
To test: 1- Upgrade to JetPack premium :) |
|
Thank you. I edited your PR description to add all this. |
* Kick off the changelog * Add 7.3.1 * Update date and post link * changelog: add #12219 * changelog: add #12170 * changelog: add #12184 * Changelog: add #12268 * Changelog: add #12081 * Changelog: add #12323 * Changelog: add #12204 * Changelog: add #12269 * Changelog: add #12332 * changelog: add #12339 * changelog: add #12209 * Changelog: add #12319 * Changelog: add #12357 * Changelog: add #12124 * Changelog: add #12373 * Changelog: add #12252 * Changelog: add #12383 * Changelog: add #12372 * changelog: add #12337 * Changelog: add #12290 * Changelog: add #12301 * Changelog: add #12061 * Testing list: add instructions for #12061 * Changelog: add #12393 * Update minimum supported version See #12287 * Changelog: add #12406 * Testing list: add #12406 * Changelog: add #12277 * Changelog: add #12412 * Changelog: add #11318 * Changelog: add #12328 * Changelog: add #12425 * Changelog: add #12380 * Changelog: add #12428 * Changelog: add #12414 * Changelog: add #12395 * Changelog & Testing list: add #12416, #12417, #12418, and #12348 * changelog: add #12379 * Changelog: add #12341 * changelog: add #12444 * Changelog: add #12434 * Changelog: add #12454 * Changelog: add #12460 * Changelog: add #12463 * Changelog: add #12457 * Changelog / testing list: add #10333 * Changelog: add #12467 Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
By default
wc_enqueue_jsmethod comes with a built-in self-executing anonymous function which makes it unnecessary to write our own within the code.Reference can be found here.
Testing Instructions
1- Upgrade to Jetpack premium
2- Enter a GA Tracking code
3- Enable basic tracking which uses legacy
ga.jsto track4- Visit the front-end and inspect the source to find the tracking code
5- See the duplication of the anonymous function
Proposed Changelog entry