Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused function from formatters #375

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

tomalec
Copy link
Member

@tomalec tomalec commented Mar 7, 2024

Changes proposed in this Pull Request:

Remove three unused functions that seem to be leftovers from the old implementation:

  • trackChangeCartItemQuantity
  • trackException
  • trackEvent

Checks:

  • Does your code follow the WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Screenshots:

Detailed test instructions:

  1. Double-check that none of those functions is used in the code
  2. Smoke test

Additional details:

Changelog entry

Dev - Remove unused functions from code.

@tomalec tomalec requested review from martynmjones and a team March 7, 2024 19:35
@tomalec tomalec self-assigned this Mar 7, 2024
@github-actions github-actions bot added the changelog: dev Developer-facing only change. label Mar 7, 2024
Copy link
Contributor

@puntope puntope left a comment

Choose a reason for hiding this comment

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

✅ LGTM

For the trackChangeCartItemQuantity seems like change_cart_quantity is not supported anymore by GA?

@mikkamp
Copy link
Contributor

mikkamp commented Mar 11, 2024

Another one that doesn't seem to be used is add_shipping_info. Can we confirm if it was the intention to include this information during either begin_checkout or the purchase event?

@puntope
Copy link
Contributor

puntope commented Mar 11, 2024

Re- Cart item quantity #312

@mikkamp mikkamp mentioned this pull request Mar 12, 2024
11 tasks
@tomalec
Copy link
Member Author

tomalec commented Mar 13, 2024

@martynmjones Could you confirm regarding car quantities?

@martynmjones
Copy link
Contributor

martynmjones commented Mar 15, 2024

Another one that doesn't seem to be used is add_shipping_info. Can we confirm if it was the intention to include this information during either begin_checkout or the purchase event?

@martynmjones Could you confirm regarding car quantities?

We weren't previously tracking quantity changes or shipping info. Both those events had been added in the initial integration with Blocks in core but in testing neither were reliable and we didn't have an alternative for classic.

So as the extension was already not tracking those events we're safe to remove them. We can then look into alternatives at a later date if we decide we want to track the additional information.

@tomalec
Copy link
Member Author

tomalec commented Mar 15, 2024

@martynmjones
Copy link
Contributor

Sorry Tomek, I wasn't clear in my previous reply. The add_shipping_info event was only added in the core integration for Blocks and then copied over when we moved tracking for Blocks to the extension.

Before that it didn't exist in the extension and there was never an equivalent for classic pages so I think we're safe to remove it.

@tomalec tomalec merged commit 36733d4 into trunk Mar 19, 2024
1 check passed
@tomalec tomalec deleted the dev/remove-unused-functions branch March 19, 2024 21:29
@eason9487 eason9487 mentioned this pull request Mar 26, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: dev Developer-facing only change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants