Closed jorgemd24 closed 2 months ago
Attention: Patch coverage is 0%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 64.5%. Comparing base (
aec6d57
) to head (e048937
). Report is 477 commits behind head on feature/google-api-project.
Changes proposed in this Pull Request:
Part of #2146
Currently, the connection test page is only available to the administrator because it is registered with the
manage_options
capability. However, all our endpoints are checking themanage_woocommerce
capability.https://github.com/woocommerce/google-listings-and-ads/blob/cbcff08cf1270def397a0317d55316c991c5efd2/src/API/PermissionsTrait.php#L20-L22
This makes it harder for a Shop Manager to debug any issues with the new approach as the connection test page is not available. Therefore, this PR updates the capability to
manage_woocommerce
. Since all actions available on the connection test page are also accessible through the UI for users withmanage_woocommerce
capability I don't think we are giving new privileges to the Shop Manager role.Screenshots:
Detailed test instructions:
add_filter('woocommerce_gla_enable_connection_test','__return_true');
or navigate towp-admin/admin.php?page=connection-test-admin-page
Additional details:
Not sure why but the phpcs were failing for the account services test, so I fixed it in this PR.
Changelog entry