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

Add WC Tracker data for Local Pickup #36847

Merged
merged 4 commits into from Feb 21, 2023
Merged

Conversation

senadir
Copy link
Member

@senadir senadir commented Feb 15, 2023

All Submissions:

Changes proposed in this Pull Request:

This PR adds extra information to the WC Tracker snapshot about the settings related to the new local pickup method.

How to test the changes in this Pull Request:

FSE theme

  1. Use Checkout block as your main Checkout.
  2. In WooCommerce->Settings->Shipping->Local Pickup, enable local pickup and add 2 locations.
  3. Ensure your test site is opted into tracking (WooCommerce > Settings > Advanced > WooCommerce.com > Usage Tracking).

Using wp shell, you can call the new method directly to check the results:

  • WC_Tracker::get_cart_checkout_info();

For example:

wp> WC_Tracker::get_cart_checkout_info()
array(7) {
  'cart_page_contains_cart_shortcode' =>
  string(2) "No"
  'checkout_page_contains_checkout_shortcode' =>
  string(2) "No"
  'cart_page_contains_cart_block' =>
  string(3) "Yes"
  'cart_block_attributes' =>
  array(1) {
    'align' =>
    string(4) "wide"
  }
  'checkout_page_contains_checkout_block' =>
  string(2) "No"
  'checkout_block_attributes' =>
  array(0) {
  }
  'pickup_location' =>
  array(2) {
    'pickup_location_enabled' =>
    bool(true)
    'pickup_locations_count' =>
    int(2)
  }
}

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 successfully run tests with your changes locally?

Changelog entry

Adds usage data for the new Local Pickup flow to the WC Tracker snapshot.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 15, 2023
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #36847 (0a05717) into trunk (8a9f7fd) will increase coverage by 0.0%.
The diff coverage is 81.2%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             trunk   #36847   +/-   ##
========================================
  Coverage     46.7%    46.7%           
- Complexity   17168    17171    +3     
========================================
  Files          429      429           
  Lines        64746    64758   +12     
========================================
+ Hits         30208    30218   +10     
- Misses       34538    34540    +2     
Impacted Files Coverage Δ
...ocommerce/includes/admin/class-wc-admin-assets.php 0.0% <0.0%> (ø)
plugins/woocommerce/includes/class-wc-ajax.php 4.4% <0.0%> (ø)
plugins/woocommerce/includes/class-wc-install.php 68.5% <ø> (ø)
plugins/woocommerce/includes/class-woocommerce.php 19.4% <ø> (ø)
...ugins/woocommerce/includes/wc-update-functions.php 1.4% <0.0%> (-<0.1%) ⬇️
plugins/woocommerce/woocommerce.php 15.4% <ø> (ø)
...rters/class-wc-product-csv-importer-controller.php 36.3% <50.0%> (ø)
plugins/woocommerce/includes/class-wc-tracker.php 89.7% <90.0%> (+<0.1%) ⬆️
...ocommerce/includes/abstracts/abstract-wc-order.php 86.9% <100.0%> (ø)
...udes/admin/settings/class-wc-settings-products.php 97.9% <100.0%> (ø)
... and 22 more

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2023

Test Results Summary

Commit SHA: 0a05717

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 14s
E2E Tests189006019516m 41s

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.

@tarhi-saad tarhi-saad self-requested a review February 20, 2023 17:39
Copy link
Contributor

@tarhi-saad tarhi-saad left a comment

Choose a reason for hiding this comment

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

Thank you, @senadir, for working on this PR! LGTM! Let's 🚢 it!

@senadir senadir merged commit 87f385e into trunk Feb 21, 2023
@senadir senadir deleted the add/tracking-for-loca-pickup branch February 21, 2023 12:33
@github-actions github-actions bot added this to the 7.6.0 milestone Feb 21, 2023
@senadir senadir modified the milestones: 7.6.0, 7.5.0 Feb 24, 2023
github-actions bot pushed a commit that referenced this pull request Feb 24, 2023
@jonathansadowski jonathansadowski modified the milestones: 7.5.0, 7.6.0 Mar 1, 2023
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.

None yet

3 participants