Skip to content

Do not render experience rating banner if Ads account is disconnected. #3000

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

Merged
merged 3 commits into from
Jul 7, 2025

Conversation

asvinb
Copy link
Collaborator

@asvinb asvinb commented Jul 4, 2025

Changes proposed in this Pull Request:

Closes https://linear.app/a8c/issue/GOOWOO-210/api-errors-triggered-from-app-ratings-notice-when-no-ads-account-is

Replace this with a good description of your changes & reasoning.

  • The useProductsReport hook is used in other parts of the app, so I avoided adding a check for a connected Ads account directly within the hook to prevent potential regressions.

Screenshots:

Detailed test instructions:

  1. Starting at URL: /wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fsettings
  2. Disconnect the Google Ads account only
  3. Visit any other tab in the plugin admin screen, e.g. the Dashboard Tab (/wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard)
  4. There should not be any error message (see ticket for error message)
  5. No requests should be sent to the /wc/gla/ads/reports/products endpoint.

Additional details:

Changelog entry

Fix – Do not render experience rating banner if Ads account is disconnected.

@asvinb asvinb requested a review from joemcgill July 4, 2025 11:16
@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 Jul 4, 2025
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.5%. Comparing base (7a1f6b0) to head (2c905d2).
Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             develop   #3000      +/-   ##
============================================
- Coverage       66.5%   66.5%    -0.0%     
============================================
  Files            491     335     -156     
  Lines          20508    5209   -15299     
  Branches           0    1273    +1273     
============================================
- Hits           13637    3463   -10174     
+ Misses          6871    1593    -5278     
- Partials           0     153     +153     
Flag Coverage Δ
js-unit-tests 66.5% <ø> (?)
php-unit-tests ?

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

see 826 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ankitguptaindia
Copy link
Collaborator

QA Status: Approved ✅

✅ Tested when the user has already rated the plugin and the banner is hidden, and the merchant disconnects the Ads account.

✅ Tested when the user has not rated the plugin yet, the banner is visible, and the merchant disconnects the Ads account.

✅ App Rating banner reappeared when the merchant reconnected only the Ads account without disconnecting/reconnecting the other accounts on the settings page.

✅ App Rating banner reappeared when the merchant disconnected all connected accounts, including Ads, and then reconfigured the plugin after completing all onboarding steps.

Functional Demo / Screencast -

Recording.1305.mp4

Testing Environment -

  • WordPress: 6.8.1
  • Theme:
    • Twenty Twenty-Five Version: 1.2
  • WooCommerce - Version 9.9.5
  • PHP: 8.3.17
  • Web Server: Nginx
  • Browser: Chrome - Version 137
  • OS: macOS Sonoma 14.6.1

@ankitguptaindia ankitguptaindia self-requested a review July 7, 2025 14:15
@joemcgill joemcgill merged commit 925efb6 into develop Jul 7, 2025
7 checks passed
@joemcgill joemcgill deleted the fix/GOOWOO-210-app-ratings-error branch July 7, 2025 19:08
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.

4 participants