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

Adjust conditions for MCM #2739

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Adjust conditions for MCM #2739

merged 1 commit into from
Dec 19, 2024

Conversation

mikkamp
Copy link
Contributor

@mikkamp mikkamp commented Dec 18, 2024

Changes proposed in this Pull Request:

As laid out in the issue woocommerce/woocommerce#53753
The conditions for registering Multi Channel Marketing channels has changed. This PR switches to using a class_exists check instead of a constant.

Detailed test instructions:

  1. Test with at least WC 9.5
  2. Enable the snippet add_filter( 'woocommerce_gla_enable_mcm', '__return_true' );
  3. Onboard with an ads account and make sure at least one campaign is created
  4. Go to Marketing > Overview
  5. Confirm that the channel is not showing
    image
  6. Check out this PR and reload the Marketing > Overview page
  7. Confirm that the channels and campaigns are showing
    image

Changelog entry

  • Tweak - Adjust conditions for MCM

@mikkamp mikkamp self-assigned this Dec 18, 2024
@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Dec 18, 2024
@mikkamp mikkamp requested a review from a team December 18, 2024 17:18
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.0%. Comparing base (3b936b3) to head (e4e93b1).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
...ernal/DependencyManagement/CoreServiceProvider.php 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             develop   #2739     +/-   ##
===========================================
+ Coverage       66.3%   67.0%   +0.7%     
  Complexity      4693    4693             
===========================================
  Files            816     479    -337     
  Lines          24805   19612   -5193     
  Branches        1273       0   -1273     
===========================================
- Hits           16435   13136   -3299     
+ Misses          8197    6476   -1721     
+ Partials         173       0    -173     
Flag Coverage Δ
js-unit-tests ?
php-unit-tests 67.0% <0.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ernal/DependencyManagement/CoreServiceProvider.php 0.0% <0.0%> (ø)

... and 337 files with indirect coverage changes

Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! LGTM.

Confirmed that the statuses and campaigns of this plugin can be shown on Marketing > Overview page. I also tested with an older version, WooCommerce 9.0, and the solution is compatible as well.

image

@mikkamp mikkamp merged commit 912976c into develop Dec 19, 2024
14 checks passed
@mikkamp mikkamp deleted the fix/mcm-conditions branch December 19, 2024 08:44
@tomalec tomalec mentioned this pull request Dec 25, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants