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

Release 2.8.0 #2483

Merged
merged 348 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
348 commits
Select commit Hold shift + click to select a range
625528c
Merge branch 'add/grant-access-to-google-wpcom-app-in-setting-page' i…
puntope Mar 20, 2024
bf3d843
Apply review comments
puntope Mar 20, 2024
43ec0ce
add Conetcion test
puntope Mar 20, 2024
fe31b81
Block syncing when notifications are enabled
puntope Mar 20, 2024
5365056
Merge pull request #2325 from woocommerce/add/api-pull-card-info
puntope Mar 21, 2024
07b12b9
Merge branch 'add/grant-access-to-google-wpcom-app-in-setting-page' i…
puntope Mar 21, 2024
dcade83
Adding tests coverage for Product SyncerHooks
puntope Mar 21, 2024
8725e17
Adding tests coverage for Coupon SyncerHooks
puntope Mar 21, 2024
e966e9c
Adding tests coverage for ProductSyncer
puntope Mar 21, 2024
9369311
Adding tests coverage for CouponSyncer
puntope Mar 21, 2024
31535f3
PHPCS
puntope Mar 21, 2024
1f3a180
PHPCS Tests
puntope Mar 21, 2024
77708de
Rename reconnect to settings in favor of b41bad3
ianlin Mar 22, 2024
02ea5a1
Merge branch 'develop' into feature/google-api-project
ianlin Mar 25, 2024
75a6006
Merge branch 'feature/google-api-project' into add/grant-access-to-go…
ianlin Mar 25, 2024
c8fa282
Add an endpoint to update wpcom rest api status
ianlin Mar 25, 2024
aaff1cf
Rollback function renaming
puntope Mar 25, 2024
31b90fe
Tweak errors description
puntope Mar 25, 2024
1705115
Add a shared hook to update rest api auth status
ianlin Mar 26, 2024
d4034b6
Move the shared hook useUpdateRestAPIAuthorizeStatus to hooks/ folder
ianlin Mar 26, 2024
f5d5054
Add test for the hook useUpdateRestAPIAuthorizeStatus
ianlin Mar 26, 2024
9d965d5
Restore package.json
puntope Mar 26, 2024
ac18037
Tweak tests
puntope Mar 26, 2024
7b6fa24
Merge pull request #2326 from woocommerce/add/block-push-products
puntope Mar 26, 2024
9325dc6
Merge branch 'develop' into feature/google-api-project
jorgemd24 Mar 26, 2024
89707bd
Throw exception when schduling without MC set
puntope Mar 26, 2024
cf0f17a
Log error when schduling without MC set
puntope Mar 26, 2024
ebe8ce6
Tweak connection test
puntope Mar 26, 2024
c69fff1
Tweak connection test
puntope Mar 26, 2024
71da3a6
Add HelperNotificationInterface
jorgemd24 Mar 26, 2024
01cee0d
Merge branch 'develop' into feature/google-api-project
ianlin Mar 27, 2024
d832ea2
Merge branch 'feature/google-api-project' into add/grant-access-to-go…
ianlin Mar 27, 2024
501c651
Rename useUpdateRestAPIAuthorizeStatus to useUpdateRestAPIAuthorizeSt…
ianlin Mar 27, 2024
1a5e3a9
Mark as notified coupon
jorgemd24 Mar 27, 2024
583f2c2
Mark as notified product
jorgemd24 Mar 27, 2024
43ee65a
Add handle notified
jorgemd24 Mar 27, 2024
54f08d4
Adjust PHPDocs for the new interface
jorgemd24 Mar 27, 2024
ebf45a7
Adjust tests for create notification
jorgemd24 Mar 27, 2024
d2472c1
Fix phpcs
jorgemd24 Mar 27, 2024
0e19d34
Add Confirmation modal for disabling API PULL Feature
puntope Mar 27, 2024
3c57d12
Fix phpcs tests
jorgemd24 Mar 27, 2024
3a7aabb
Add get all shipping times
jorgemd24 Mar 27, 2024
c76e49f
Add ShippingTimeQuery to WPCOM proxy
jorgemd24 Mar 27, 2024
57203d5
Add target audience and shipping time to the settings endpoint
jorgemd24 Mar 27, 2024
07ddeab
Use GOOGLE_WPCOM_APP_CONNECTED_STATUS constant
ianlin Mar 28, 2024
cc23c0b
Add missing `@since` PHPDoc
ianlin Mar 28, 2024
2262966
Correct the PHPDoc regarding HTTP method
ianlin Mar 28, 2024
f19b5f7
Add oauth statuses as constants
ianlin Mar 28, 2024
b9960ce
Create a nonce and add it to the state URL param, verify nonce when
ianlin Mar 28, 2024
98bfad7
Add tests for create/verify nonce in OAuth flow
ianlin Mar 28, 2024
30bc13b
Get site_nonce query param and pass it as body when updating REST API…
ianlin Mar 28, 2024
e8efb1b
Add Filter for enabling the Notifications service
puntope Mar 28, 2024
41a520e
Merge branch 'add/grant-access-to-google-wpcom-app-in-setting-page' i…
puntope Mar 28, 2024
063dc50
Add docs for rest_request_after_callbacks filter
jorgemd24 Mar 28, 2024
1c7e743
Add tests for general settings endpoint
jorgemd24 Mar 28, 2024
5f10066
Fix tests phpcs
jorgemd24 Mar 28, 2024
7ef7209
Merge pull request #2338 from woocommerce/add/mark-as-notified
jorgemd24 Mar 28, 2024
3f122d7
Merge branch 'feature/google-api-project' into add/target-audience-an…
jorgemd24 Mar 28, 2024
0bd0e13
Remove update TARGET_AUDIENCE option to make it consistent with the …
jorgemd24 Mar 28, 2024
657bbf9
Add missing since
jorgemd24 Mar 28, 2024
c3d7b8b
Revert "Get site_nonce query param and pass it as body when updating …
ianlin Mar 29, 2024
1ce9c50
Revert "Add tests for create/verify nonce in OAuth flow"
ianlin Mar 29, 2024
0e771c3
Revert "Create a nonce and add it to the state URL param, verify nonc…
ianlin Mar 29, 2024
8ceb779
Update since tag
jorgemd24 Apr 2, 2024
abf7737
Merge pull request #2311 from woocommerce/add/grant-access-to-google-…
ianlin Apr 2, 2024
9031c8c
Merge pull request #2342 from woocommerce/add/target-audience-and-shi…
jorgemd24 Apr 2, 2024
4b6c5e2
Merge branch 'develop' into feature/google-api-project
ianlin Apr 2, 2024
1631c26
Merge pull request #2339 from woocommerce/add/modal-disable-api
puntope Apr 2, 2024
dd09487
Merge pull request #2340 from woocommerce/add/filter-for-enabling-banner
puntope Apr 2, 2024
7210a00
Merge remote-tracking branch 'origin/feature/google-api-project' into…
puntope Apr 2, 2024
dee5dc8
Merge branch 'feature/google-api-project' into add/validate-mc-connec…
puntope Apr 2, 2024
253d510
Tweak tests
puntope Apr 2, 2024
c9e9bc7
PHPCS
puntope Apr 2, 2024
7d81fe2
Merge pull request #2336 from woocommerce/add/validate-mc-connection-…
puntope Apr 2, 2024
512acfa
Set options for Notifications in connection test
puntope Apr 3, 2024
653ae2a
Merge pull request #2346 from woocommerce/fix/fatal-when-sending-noti…
puntope Apr 4, 2024
aec6d57
Add offer id on product deletions
puntope Apr 5, 2024
fa9aa82
Tests and PHPCS
puntope Apr 8, 2024
555f137
Add logs
puntope Apr 8, 2024
cfe9ece
Add missing return types
puntope Apr 8, 2024
ec2cbbb
Add some comments explaining Offer Id
puntope Apr 9, 2024
3121799
Merge pull request #2354 from woocommerce/tweak/add-offer-id-product-…
puntope Apr 10, 2024
06a851c
Add get_all_aggregated_values to attributemanager
jorgemd24 Apr 11, 2024
7b851d9
Expose attribute in WC REST product responses
jorgemd24 Apr 11, 2024
9c465ae
Add attributes to the variations endpoint
jorgemd24 Apr 11, 2024
42e4628
PHPcs attribute manager
jorgemd24 Apr 11, 2024
a189247
Add tests for aggregated values
jorgemd24 Apr 11, 2024
76298ec
Install testing tables
jorgemd24 Apr 11, 2024
d2d8b32
Add WPCOM tests for product attributes
jorgemd24 Apr 11, 2024
68c0de3
Merge branch 'develop' into feature/google-api-project
ianlin Apr 12, 2024
3f7f0ab
Save the nonce from Google's API when generating auth URL
ianlin Apr 12, 2024
4a391ac
Return option `google_wpcom_auth_nonce` in MC connected API
ianlin Apr 12, 2024
eaf1942
Verify nonces from URL query and the one stored in DB options
ianlin Apr 15, 2024
21bc183
Move "maybe update auth status" from settings page to GMC accout card
ianlin Apr 15, 2024
a94ac95
Delete the nonce after successfully update auth status in DB
ianlin Apr 15, 2024
b24706e
Remove the nonce query param from the URL after auth status updated
ianlin Apr 15, 2024
689273c
Merge pull request #2366 from woocommerce/update/expose-attribute-map…
jorgemd24 Apr 15, 2024
b51c815
Merge branch 'develop' into feature/google-api-project
ianlin Apr 18, 2024
2bac856
Don't compare nonces if each of the nonce is not provided
ianlin Apr 18, 2024
2afd50e
Also delete google wpcom auth nonce in DELETE /rest-api/authorize API
ianlin Apr 19, 2024
1ee9f80
Compare nonces in PUT /rest-api/authorize API
ianlin Apr 22, 2024
cc2e7dd
Remove nonces comparison in the frontend
ianlin Apr 23, 2024
b8c2ff7
Move 'verify nonce and update auth status' back to settings page
ianlin Apr 23, 2024
dfa6f4a
Don't return `google_wpcom_auth_nonce` in API GET /mc/connection
ianlin Apr 23, 2024
85d39f0
Also delete google wpcom auth nonce when nonces comparison mismatch
ianlin Apr 23, 2024
0ec65c0
Add more descriptions in method `update_wpcom_api_authorization()`
ianlin Apr 23, 2024
6f37fed
Test passing args in AccountServiceTest
ianlin Apr 25, 2024
6c6f88c
Rephrase PHPDoc description for update_wpcom_api_authorization method
ianlin Apr 25, 2024
a289588
Update return type in PHPDoc for update_wpcom_api_authorization method
ianlin Apr 25, 2024
f68f09b
Use expectException to avoid using try/catch in PHP unit test
ianlin Apr 25, 2024
5465bf0
Delete nonce in update / reset auth status service, rather than in the
ianlin Apr 25, 2024
009c3df
Simplify variable name by replacing nonceFromURLQuery with nonce
ianlin Apr 25, 2024
e3ed1da
Merge pull request #2369 from woocommerce/tweak/verify-nonce-when-set…
ianlin Apr 26, 2024
01ad9d9
Merge branch 'develop' into feature/google-api-project
ianlin May 10, 2024
277f3e9
Rename redirect_url to store_url in the state variable
ianlin May 10, 2024
d302ecd
Fix PHPCS
ianlin May 10, 2024
a532e05
Correcting grammar
ianlin May 13, 2024
c7537af
Merge pull request #2396 from woocommerce/tweak/rename-redirect-url-t…
ianlin May 13, 2024
165263b
Merge branch 'develop' into feature/google-api-project
ianlin May 16, 2024
d6898e0
Add Test remote site status
jorgemd24 May 22, 2024
fae0285
Remove xdebug query parameter
jorgemd24 May 22, 2024
bfa8533
Add remove parter token action
jorgemd24 May 23, 2024
a8724c2
remove xdebug query parameter
jorgemd24 May 23, 2024
9b95e54
Handle errors from WPCOM
jorgemd24 May 27, 2024
1b2ff1f
Get Auth params with SDI
puntope May 28, 2024
940c75d
Update endpoint
jorgemd24 May 28, 2024
3c7466a
Add tracker snapshot for wpcom_rest_api_authorized
puntope May 30, 2024
c9a8738
PHPCS
puntope May 30, 2024
9e07c71
Merge pull request #2409 from woocommerce/add/test-remote-site-status
jorgemd24 Jun 3, 2024
3f8a5b8
Merge pull request #2410 from woocommerce/add/remove-partner-token
jorgemd24 Jun 3, 2024
7ba18a6
Merge pull request #2418 from woocommerce/add/tracking-snapshot
puntope Jun 4, 2024
8a769ba
Merge branch 'feature/google-api-project' into add/auth-flow
puntope Jun 6, 2024
74fd4cb
Add WPCOM API OAuth revoke endpoint logic
puntope Jun 6, 2024
3d8c043
Add SDI call for getting thr Google OAuth params
puntope Jun 6, 2024
0abe152
Tweak Notifications feature banner
puntope Jun 6, 2024
74300c5
Add tests for middleware sdi
puntope Jun 7, 2024
aa33687
Tweak tests for OauthService
puntope Jun 7, 2024
b4173b6
PHPCS for tests
puntope Jun 7, 2024
c865103
Allow to trigger notification and push sync jobs
jorgemd24 Jun 12, 2024
58f4087
Update condition for should_push
jorgemd24 Jun 12, 2024
4d3d614
Pass args when notify shipping settings
jorgemd24 Jun 12, 2024
32d7574
Adjust tests
jorgemd24 Jun 12, 2024
fade9dd
phpcs
jorgemd24 Jun 12, 2024
61c0a66
Add deactivate method
jorgemd24 Jun 13, 2024
3613982
Move reset_wpcom_api_authorization_data to OAuthService
jorgemd24 Jun 13, 2024
cf44cde
Add Jetpack proxy to facilitate testing
jorgemd24 Jun 13, 2024
a865473
Add tests
jorgemd24 Jun 13, 2024
38a2718
Merge pull request #2428 from woocommerce/update/allow-pull-and-push-…
jorgemd24 Jun 13, 2024
adb21da
Add missing dependecy
jorgemd24 Jun 13, 2024
3d5aa55
Add loading in banner
puntope Jun 14, 2024
5b9a462
Fix docs
puntope Jun 14, 2024
436881c
Remove unused dependency
puntope Jun 14, 2024
ece73b1
Handle errors
puntope Jun 14, 2024
ca4e95c
PHPCS
puntope Jun 14, 2024
f70f89e
Tweak error handling
puntope Jun 14, 2024
bba7b0c
PHPCS
puntope Jun 17, 2024
6fee5bd
Fix error when revoke fails
puntope Jun 18, 2024
e7f21d9
Add language param in settings endpoint
puntope Jun 18, 2024
22bb6ba
Add since
jorgemd24 Jun 18, 2024
bfdca07
Update auth generate URL
puntope Jun 19, 2024
719b9a9
Update field name
puntope Jun 19, 2024
e6fd185
Tweak tests
puntope Jun 19, 2024
b9ce5da
PHPCS
puntope Jun 19, 2024
0039fe5
Merge pull request #2436 from woocommerce/tweak/add-language-settings…
puntope Jun 19, 2024
d3260bd
Fix issue with inconsistent metadata format
jorgemd24 Jun 20, 2024
4191554
Merge branch 'develop' into feature/google-api-project
jorgemd24 Jun 20, 2024
58066af
Merge branch 'develop' into feature/google-api-project
jorgemd24 Jun 20, 2024
a4cf0ed
Merge pull request #2437 from woocommerce/fix/inconsistent_metadata_f…
jorgemd24 Jun 20, 2024
d156117
Merge branch 'feature/google-api-project' into add/auth-flow
puntope Jun 24, 2024
08c9b61
PHPCS
puntope Jun 24, 2024
ec1e862
Remove unused old tests
puntope Jun 24, 2024
cbcff08
Change connection test page capabilities to manage_woocommerce
jorgemd24 Jun 25, 2024
0f7944a
Fix phpcs
jorgemd24 Jun 25, 2024
e048937
Fix phpcs account service test
jorgemd24 Jun 25, 2024
d20d93f
Merge pull request #2443 from woocommerce/tweak/connection-test-page-…
jorgemd24 Jun 26, 2024
e42f728
Document exceptions
puntope Jun 26, 2024
b085f64
Merge pull request #2424 from woocommerce/add/auth-flow
puntope Jun 26, 2024
8ef22dd
Merge branch 'feature/google-api-project' into add/revoke-access-if-p…
jorgemd24 Jun 27, 2024
0ee9c96
Merge branch 'feature/google-api-project' into add/revoke-access-if-p…
jorgemd24 Jun 27, 2024
e9313eb
Adjust tests
jorgemd24 Jun 27, 2024
7ff8a9e
REmove unncessary else
jorgemd24 Jun 27, 2024
b6fcae8
Merge pull request #2430 from woocommerce/add/revoke-access-if-plugin…
jorgemd24 Jun 27, 2024
0f2078f
Enable Notifications by default
puntope Jul 3, 2024
906bc4e
Catch exception when revoking api token
jorgemd24 Jul 3, 2024
ecefb15
Adjust tests when revoking token
jorgemd24 Jul 3, 2024
b55803b
Remove redundant revoke token
jorgemd24 Jul 3, 2024
dc34f56
Log deactivate error
jorgemd24 Jul 3, 2024
bbb4b6c
Handle Product Variations creation and deletion
puntope Jul 3, 2024
66a96f0
Tweak tests for get_offer_id
puntope Jul 3, 2024
2ad5d0e
Test for variations notifications
puntope Jul 3, 2024
1b92296
PHPCS
puntope Jul 3, 2024
9d2d574
Tweak Notification Service feature check
puntope Jul 4, 2024
009ec0d
Add track evens when revoking token
jorgemd24 Jul 4, 2024
5388e06
Add tests when revoking token
jorgemd24 Jul 4, 2024
db27c06
Add track evens when updating Auth status
jorgemd24 Jul 4, 2024
792ef21
Adjust test
jorgemd24 Jul 4, 2024
13b47f0
Merge pull request #2449 from woocommerce/tweak/handle-wp-error-revok…
jorgemd24 Jul 4, 2024
d47c264
Merge branch 'feature/google-api-project' into tweak/enable-notificat…
puntope Jul 4, 2024
51eb4d3
Merge pull request #2448 from woocommerce/tweak/enable-notifications-…
puntope Jul 4, 2024
be2876d
Add blog_id tracking
jorgemd24 Jul 4, 2024
413c7c5
Delete metas after notifying deletion
puntope Jul 5, 2024
ff8468e
Tweak logic for varitions
puntope Jul 5, 2024
9ee9675
PHPCS
puntope Jul 5, 2024
9e041f5
Add parameter definition
puntope Jul 5, 2024
96f16b9
Add docs for exceptions
puntope Jul 5, 2024
e052b59
Ensure empty array is converted to object
jorgemd24 Jul 7, 2024
0642055
Adjust tests
jorgemd24 Jul 7, 2024
fb8b49c
Add event property directives and descriptions
jorgemd24 Jul 7, 2024
062099f
Merge branch 'develop' into feature/google-api-project
jorgemd24 Jul 7, 2024
f03a407
Check if product is WC_Product
puntope Jul 8, 2024
bad2524
Merge pull request #2455 from woocommerce/tweak/gla-attributes-respon…
jorgemd24 Jul 8, 2024
2171ce6
Adjust event properties
jorgemd24 Jul 8, 2024
0ba7fcd
Merge pull request #2450 from woocommerce/tweak/notifications-variations
puntope Jul 8, 2024
e7be1ca
Adjust event property
jorgemd24 Jul 8, 2024
422f3f6
Merge pull request #2452 from woocommerce/add/track-event-auth-wpcom
jorgemd24 Jul 8, 2024
0159630
Disable create and update for variations
puntope Jul 9, 2024
48be943
Merge pull request #2464 from woocommerce/tweak/disable-notifications…
puntope Jul 10, 2024
822e9b2
Add e2e tests for Notifications Grant Access
puntope Jul 21, 2024
1818ce4
Remove unnecessary mocks
puntope Jul 21, 2024
b349674
Merge branch 'develop' into feature/google-api-project
puntope Jul 21, 2024
4380d21
Merge branch 'feature/google-api-project' into dev/notifications-e2e-…
puntope Jul 21, 2024
3bc8421
Bump socket.io-parser from 3.3.3 to 3.3.4
dependabot[bot] Jul 23, 2024
45952f6
Merge pull request #2474 from woocommerce/dev/notifications-e2e-grant…
puntope Jul 23, 2024
6b16e2a
Add e2e for Scheduling notifications
puntope Jul 24, 2024
73c6e42
Change test name
puntope Jul 24, 2024
100beff
Merge pull request #2478 from woocommerce/trunk
martynmjones Jul 24, 2024
153dd22
Merge branch 'develop' into feature/google-api-project
puntope Jul 25, 2024
9bd2588
Merge branch 'feature/google-api-project' into dev/e2e-notifications-…
puntope Jul 25, 2024
bd200ed
TWeak e2e test logic for notifications
puntope Jul 25, 2024
2b78877
Merge pull request #2477 from woocommerce/dev/e2e-notifications-schedule
puntope Jul 25, 2024
d6500c1
Merge pull request #2475 from woocommerce/dependabot/npm_and_yarn/soc…
eason9487 Jul 26, 2024
68a0d2d
Merge branch 'develop' into feature/google-api-project
puntope Jul 26, 2024
23dafb9
Merge pull request #2480 from woocommerce/feature/google-api-project
puntope Jul 26, 2024
e34d260
Rename Google for WooCommerce
puntope May 20, 2024
a0bca30
Add Rebranding Tour
puntope May 27, 2024
6226cad
Lint
puntope May 28, 2024
40ad5ac
Tests
puntope May 28, 2024
d023d27
Tweak texts
puntope May 28, 2024
c48664f
TWeak texts for the tour
puntope Jun 28, 2024
a457bb3
Tweak selector
puntope Jul 1, 2024
7251106
Changelog tweak
puntope May 20, 2024
c02abe3
Update package lock
puntope Jul 26, 2024
c3f4679
Merge pull request #2481 from woocommerce/tweak/rebranding
puntope Jul 26, 2024
a1a0ff7
Adding more tests for Notifications
puntope Jul 28, 2024
4164bc2
Merge pull request #2482 from woocommerce/dev/e2e-notifications
puntope Jul 29, 2024
b96396e
Start `release/2.8.0`.
github-actions[bot] Jul 31, 2024
ac234db
Changelog update
puntope Jul 31, 2024
367e139
woorelease: Product version bump update
puntope Jul 31, 2024
5dc1a01
woorelease: Changelog update
puntope Jul 31, 2024
d3fc95e
Update hooks documentation from branch.
github-actions[bot] Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing

Thanks for your interest in contributing to Google Listings and Ads!
Thanks for your interest in contributing to Google for WooCommerce!

## Guidelines

Like the WooCommerce project, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](./CODE_OF_CONDUCT.md).

If you wish to contribute code, please read the information in the sections below. Then [fork](https://help.github.com/articles/fork-a-repo/) Google Listings and Ads, commit your changes, and [submit a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 🎉
If you wish to contribute code, please read the information in the sections below. Then [fork](https://help.github.com/articles/fork-a-repo/) Google for WooCommerce, commit your changes, and [submit a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) 🎉

Google Listings and Ads is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.
Google for WooCommerce is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license.

## Reporting Security Issues

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Google Listings & Ads
# Google for WooCommerce

[![PHP Unit Tests](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-unit-tests.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-unit-tests.yml)
[![JavaScript Unit Tests](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-unit-tests.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-unit-tests.yml)
Expand All @@ -19,7 +19,7 @@ This repository is not suitable for support. Please don't use our issue tracker

For self help, start with our [user documentation](https://woocommerce.com/document/google-listings-and-ads/).

The best place to get support is the [WordPress.org Google Listings and Ads forum](https://wordpress.org/support/plugin/google-listings-and-ads/).
The best place to get support is the [WordPress.org Google for WooCommerce forum](https://wordpress.org/support/plugin/google-listings-and-ads/).

If you have a WooCommerce.com account, you can [start a chat or open a ticket on WooCommerce.com](https://woocommerce.com/my-account/contact-support/).

Expand Down
10 changes: 7 additions & 3 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
*** WooCommerce Google Listings and Ads Changelog ***
*** Google for WooCommerce Changelog ***

= 2.8.0 - 2024-07-31 =
* Add Google API Pull method.
* Rebranding Google Listings and Ads with Google for WooCommerce.

= 2.7.7 - 2024-07-24 =
* Dev - Fix E2E tests failed with WC 9.1.
Expand Down Expand Up @@ -350,7 +354,7 @@
* Add - Declare compatibility for High Performance Order Storage.
* Dev - Selectively externalize bundled packages.
* Fix - E2E Testing: Reduce the false positive rate and adjust the running events on GitHub Actions.
* Fix - Move the order of Google Listings & Ads below the Coupons in the Marketing menu of WooCommerce admin page.
* Fix - Move the order of Google Listings and Ads below the Coupons in the Marketing menu of WooCommerce admin page.
* Fix - WC 6.9 compatibility: Shipping time settings should not appear after selecting the "complex" shipping option.
* Fix - WC 6.9 compatibility: The free shipping threshold should be cleared after selecting the "No" free shipping option.
* Fix - WC 6.9 compatibility: The selected free shipping option should be reset after setting all shipping rates to 0.
Expand Down Expand Up @@ -560,7 +564,7 @@
= 1.12.0 - 2022-03-29 =
* Add - Additional data points for tracker snapshot.
* Add - Enables merchants to select multiple countries as their audience when creating a Google Ads campaign (Smart Shopping Campaign).
* Add - Google Listings And Ads product attributes icon.
* Add - Google Listings and Ads product attributes icon.
* Add - Integration with WooCommerce Shipping Zone to automatically sync shipping settings to Merchant Center.
* FIx - Show right link and message in Paid Campaigns report when there is no data available.
* Fix - Cleanup synced products locally when disconnecting Merchant Center account.
Expand Down
4 changes: 2 additions & 2 deletions docs/gtag-consent-mode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Google Analytics (gtag) Consent Mode

Unless you're running the [Google Analytics for WooCommerce](https://woocommerce.com/products/woocommerce-google-analytics/) extension for a more sophisticated configuration, Google Listings and Ads will add Google's `gtag` to help you track some customer behavior.
Unless you're running the [Google Analytics for WooCommerce](https://woocommerce.com/products/woocommerce-google-analytics/) extension for a more sophisticated configuration, Google for WooCommerce will add Google's `gtag` to help you track some customer behavior.

To respect your customers' privacy, we set up the default state of [consent mode](https://support.google.com/analytics/answer/9976101). We set it to deny all the parameters for visitors from the EEA region.

Expand All @@ -12,4 +12,4 @@ After the page loads, the consent for particular parameters can be updated by ot

The extension does not provide any UI, like a cookie banner, to let your visitors grant consent for tracking. However, it's integrated with [WP Consent API](https://wordpress.org/plugins/wp-consent-api/), so you can pick another extension that provides a banner that meets your needs.

Each of those extensions may require additional setup or registration. Usually, the basic default setup works out of the box, but there may be some integration caveats.
Each of those extensions may require additional setup or registration. Usually, the basic default setup works out of the box, but there may be some integration caveats.
6 changes: 3 additions & 3 deletions google-listings-and-ads.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Plugin Name: Google Listings and Ads
* Plugin Name: Google for WooCommerce
* Plugin URL: https://wordpress.org/plugins/google-listings-and-ads/
* Description: Native integration with Google that allows merchants to easily display their products across Google’s network.
* Version: 2.7.7
* Version: 2.8.0
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Text Domain: google-listings-and-ads
Expand All @@ -30,7 +30,7 @@

defined( 'ABSPATH' ) || exit;

define( 'WC_GLA_VERSION', '2.7.7' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_VERSION', '2.8.0' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_MIN_PHP_VER', '7.4' );
define( 'WC_GLA_MIN_WC_VER', '6.9' );

Expand Down
2 changes: 2 additions & 0 deletions js/src/attribute-mapping/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Section from '.~/wcdl/section';
import AttributeMappingDescription from './attribute-mapping-description';
import AttributeMappingTable from './attribute-mapping-table';
import NavigationClassic from '.~/components/navigation-classic';
import RebrandingTour from '.~/components/tours/rebranding-tour';
import './index.scss';

/**
Expand All @@ -21,6 +22,7 @@ const AttributeMapping = () => {
return (
<div className="gla-attribute-mapping">
<NavigationClassic />
<RebrandingTour />
<Section
title={ __( 'Manage attributes', 'google-listings-and-ads' ) }
description={ <AttributeMappingDescription /> }
Expand Down
29 changes: 28 additions & 1 deletion js/src/attribute-mapping/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,14 @@ jest.mock( '.~/hooks/usePolling', () => ( {
} ),
} ) );

jest.mock( '.~/components/tours/rebranding-tour', () =>
jest.fn().mockReturnValue( null ).mockName( 'RebrandingTour' )
);

/**
* External dependencies
*/
import { render, fireEvent } from '@testing-library/react';
import { render, fireEvent, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import userEvent from '@testing-library/user-event';

Expand All @@ -153,6 +157,7 @@ import {
} from '.~/data/actions';
import AttributeMappingSync from '.~/attribute-mapping/attribute-mapping-sync';
import usePolling from '.~/hooks/usePolling';
import RebrandingTour from '.~/components/tours/rebranding-tour';

describe( 'Attribute Mapping', () => {
test( 'Renders table', () => {
Expand Down Expand Up @@ -378,4 +383,26 @@ describe( 'Attribute Mapping', () => {
const { queryByText } = render( <AttributeMappingSync /> );
expect( queryByText( 'Scheduled for sync' ) ).toBeTruthy();
} );

describe( 'Rebranding Tour', () => {
test( 'Not rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return null;
} );

render( <AttributeMapping /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).not.toBeInTheDocument();
} );

test( 'Rendered in UI', () => {
RebrandingTour.mockImplementation( () => {
return <div role="dialog" aria-label="tour" />;
} );

render( <AttributeMapping /> );
const tour = screen.queryByRole( 'dialog', { name: 'tour' } );
expect( tour ).toBeInTheDocument();
} );
} );
} );
33 changes: 33 additions & 0 deletions js/src/components/app-notice/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* External dependencies
*/
import classnames from 'classnames';
import { Notice } from '@wordpress/components';

/**
* Internal dependencies
*/
import './index.scss';

/**
* Renders a Notice component with extra props.
*
* It supports all the props from @wordpress/components - Notice Component
*
* ## Usage
*
* ```jsx
* <AppNotice >
* My Notice
* </AppButton>
* ```
*
* @param {*} props Props to be forwarded to {@link Notice}.
*/
const AppNotice = ( props ) => {
const { className, ...rest } = props;
const classes = [ 'app-notice', className ];
return <Notice className={ classnames( ...classes ) } { ...rest } />;
};

export default AppNotice;
6 changes: 6 additions & 0 deletions js/src/components/app-notice/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.app-notice {
border: 0;
font-size: $helptext-font-size;
margin: 0 var(--large-gap) var(--main-gap);
padding: $grid-unit-20;
}
58 changes: 58 additions & 0 deletions js/src/components/enable-new-product-sync-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { addQueryArgs } from '@wordpress/url';
import { useState } from '@wordpress/element';

/**
* Internal dependencies
*/
import AppButton from '.~/components/app-button';
import { glaData } from '.~/constants';
import { API_NAMESPACE } from '.~/data/constants';
import useApiFetchCallback from '.~/hooks/useApiFetchCallback';
import useDispatchCoreNotices from '.~/hooks/useDispatchCoreNotices';

/**
* Button to initiate auth process for WP Rest API
*
* @param {Object} params The component params
* @return {JSX.Element} The button.
*/
const EnableNewProductSyncButton = ( params ) => {
const { createNotice } = useDispatchCoreNotices();
const [ loading, setLoading ] = useState( false );
const nextPageName = glaData.mcSetupComplete ? 'settings' : 'setup-mc';
const query = { next_page_name: nextPageName };
const path = addQueryArgs( `${ API_NAMESPACE }/rest-api/authorize`, query );
const [ fetchRestAPIAuthorize ] = useApiFetchCallback( { path } );
const handleEnableClick = async () => {
try {
setLoading( true );
const d = await fetchRestAPIAuthorize();
setLoading( false );
window.location.href = d.auth_url;
} catch ( error ) {
setLoading( false );
createNotice(
'error',
__(
'Unable to enable new product sync. Please try again later.',
'google-listings-and-ads'
)
);
}
};

return (
<AppButton
isSecondary
loading={ loading }
onClick={ handleEnableClick }
{ ...params }
/>
);
};

export default EnableNewProductSyncButton;
56 changes: 56 additions & 0 deletions js/src/components/enable-new-product-sync-notice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Notice } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';

/**
* Internal dependencies
*/
import useGoogleMCAccount from '.~/hooks/useGoogleMCAccount';
import EnableNewProductSyncButton from '.~/components/enable-new-product-sync-button';

/**
* Shows info {@link Notice}
* about enabling new product sync when the feature flag is turned on and hasn't switched to new product sync.
*
* @return {JSX.Element} {@link Notice} element with the info message and the button to enable new product sync.
*/
const EnableNewProductSyncNotice = () => {
const {
hasFinishedResolution: hasGoogleMCAccountFinishedResolution,
googleMCAccount,
} = useGoogleMCAccount();

// Do not render if already switch to new product sync.
if (
! hasGoogleMCAccountFinishedResolution ||
! googleMCAccount.notification_service_enabled ||
googleMCAccount.wpcom_rest_api_status
) {
return null;
}

return (
<Notice status="info" isDismissible={ false }>
{ createInterpolateElement(
__(
'<p>We will soon transition to a new and improved method for synchronizing product data with Google.</p><enableButton>Get early access</enableButton>',
'google-listings-and-ads'
),
{
enableButton: (
<EnableNewProductSyncButton
eventName="gla_enable_product_sync_click"
eventProps={ { context: 'banner' } }
/>
),
p: <p />,
}
) }
</Notice>
);
};

export default EnableNewProductSyncNotice;
Loading