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.6.7 #2372

Merged
merged 38 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
744d72d
Add support for program types when requesting a review
puntope Apr 1, 2024
cb628f5
Tweak Request review length check
puntope Apr 2, 2024
214492a
Merge pull request #2358 from woocommerce/trunk
jorgemd24 Apr 9, 2024
1c6e04d
Merge pull request #2344 from woocommerce/fix/request-review
puntope Apr 9, 2024
cf8d8a3
Bump @automattic/components in the npm_and_yarn group
dependabot[bot] Apr 10, 2024
cb47e44
Fix an issue that the Product Block Editor feature is not correctly d…
eason9487 Apr 10, 2024
7cee5e7
Remove snippet to bypass dependency
martynmjones Apr 10, 2024
6ee0306
Move WC installation from test-env-setup.sh to .wp-env.json
martynmjones Apr 10, 2024
ac228a2
Merge pull request #2362 from woocommerce/update/e2e-test-environment
martynmjones Apr 10, 2024
44d1f31
Merge pull request #2360 from woocommerce/dev/e2e-fix-disable-product…
eason9487 Apr 11, 2024
02ab2e5
Set the variable product tour of classic product editor to not display.
eason9487 Apr 9, 2024
4664895
Classic product editor E2E test: Prompt to Get Started when not yet f…
eason9487 Apr 9, 2024
9a5e5b0
Classic product editor E2E test: Hide plugin tab and meta box for uns…
eason9487 Apr 9, 2024
2369b19
Classic product editor E2E test: Check existence and availability of …
eason9487 Apr 9, 2024
932663d
Classic product editor E2E test: Check existence of fields for variab…
eason9487 Apr 10, 2024
e716d37
Classic product editor E2E test: Channel visibility is disabled when …
eason9487 Apr 10, 2024
1f7b7be
Classic product editor E2E test: Change channel visibility and check …
eason9487 Apr 10, 2024
0c446cf
Classic product editor E2E test: Custom input - Select with text input
eason9487 Apr 10, 2024
182a648
Classic product editor E2E test: Custom input - Date and time inputs
eason9487 Apr 11, 2024
bef75b9
Classic product editor E2E test: Custom input - Non-negative integer …
eason9487 Apr 11, 2024
b589c26
Classic product editor E2E test: Save all product attributes to simpl…
eason9487 Apr 11, 2024
7ed19ba
Classic product editor E2E test: Save all product attributes to varia…
eason9487 Apr 11, 2024
253f16c
Temporarily enable pull requests to trigger E2E Tests on GitHub Actions.
eason9487 Mar 21, 2024
e5aa7d3
Revert "Bump @automattic/components in the npm_and_yarn group"
eason9487 Apr 12, 2024
d5a7500
Override the `debug` dependency under `@automattic/components` to use…
eason9487 Apr 12, 2024
8085c2b
Merge pull request #2359 from woocommerce/dependabot/npm_and_yarn/npm…
eason9487 Apr 12, 2024
e2f4b7f
Exclude dev-related files from the build bundle.
eason9487 Apr 12, 2024
7f6c4a4
Merge pull request #2367 from woocommerce/dev/update-export-ignore
eason9487 Apr 15, 2024
8a79933
Create a new E2E API utils `createVariableWithVariationProducts` to r…
eason9487 Apr 15, 2024
09e8b18
Extract the `getAllProductAttributes` in the E2E utils `product-edito…
eason9487 Apr 15, 2024
f21dd78
Extract the `getAvailableProductAttributesWithTestValues` to the E2E …
eason9487 Apr 15, 2024
b36f43f
Revert "Temporarily enable pull requests to trigger E2E Tests on GitH…
eason9487 Apr 15, 2024
33c35a8
Merge pull request #2363 from woocommerce/dev/e2e-classic-product-editor
eason9487 Apr 15, 2024
a54abcf
Start `release/2.6.7`.
github-actions[bot] Apr 16, 2024
d9964f1
Remove older changelog entries
ianlin Apr 16, 2024
ba6d8bb
Product version bump update
Apr 16, 2024
489e50d
Changelog update
Apr 16, 2024
e3d2d26
Update hooks documentation from branch.
github-actions[bot] Apr 16, 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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ bin export-ignore
tests export-ignore
js/src export-ignore
js/build-dev export-ignore
docs export-ignore
README.md export-ignore
package.json export-ignore
package-lock.json export-ignore
Expand All @@ -20,6 +21,7 @@ webpack.config.js export-ignore
webpack-development.config.js export-ignore
jest.config.js export-ignore
wordpress_org_assets export-ignore
.codecov.yml export-ignore
.editorconfig export-ignore
.externalized.json export-ignore
.prettierrc.js export-ignore
Expand All @@ -28,5 +30,7 @@ wordpress_org_assets export-ignore
.eslintrc.js export-ignore
.stylelintignore export-ignore
.stylelintrc.json export-ignore
.npmrc export-ignore
.nvmrc export-ignore
.jsdocrc.json export-ignore
.wp-env.json export-ignore
1 change: 1 addition & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"phpVersion": "8.0",
"plugins": [
"https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip",
"https://github.com/WP-API/Basic-Auth/archive/master.zip",
"./tests/e2e/test-data",
"./tests/e2e/test-snippets",
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
*** WooCommerce Google Listings and Ads Changelog ***

= 2.6.7 - 2024-04-16 =
* Dev - Add E2E tests for the integration in the classic product editor.
* Dev - Update e2e test environment to install WooCommerce earlier.
* Fix - Exception in request review.

= 2.6.6 - 2024-04-09 =
* Dev - Add snippet to bypass WooCommerce dependency in E2E tests.
* Tweak - WC 8.8 compatibility.
Expand Down
4 changes: 2 additions & 2 deletions google-listings-and-ads.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Google Listings and Ads
* 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.6.6
* Version: 2.6.7
* Author: WooCommerce
* Author URI: https://woo.com/
* Text Domain: google-listings-and-ads
Expand All @@ -30,7 +30,7 @@

defined( 'ABSPATH' ) || exit;

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

Expand Down
3 changes: 2 additions & 1 deletion js/src/product-feed/review-request/review-request-notice.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const ReviewRequestNotice = ( {
<FlexItem className="gla-review-request-notice__button">
{ accountReviewStatus.requestButton &&
( account.cooldown ||
account.reviewEligibleRegions.length > 0 ) && (
Object.keys( account.reviewEligibleRegions )?.length >
0 ) && (
<AppButton
isPrimary
onClick={ onRequestReviewClick }
Expand Down
67 changes: 36 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "google-listings-and-ads",
"title": "Google Listings and Ads",
"version": "2.6.6",
"version": "2.6.7",
"description": "google-listings-and-ads",
"author": "Automattic",
"license": "GPL-3.0-or-later",
Expand Down Expand Up @@ -82,6 +82,9 @@
"engine.io-client": {
"xmlhttprequest-ssl@<1.6.2": "1.6.2",
"ws@<6.2.2": "6.2.2"
},
"socket.io-client": {
"debug@<4.3.1": "4.3.1"
}
},
"scripts": {
Expand Down
11 changes: 6 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
Requires PHP Architecture: 64 Bits
Stable tag: 2.6.6
Stable tag: 2.6.7
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -111,6 +111,11 @@ Yes, you can run both at the same time, and we recommend it! In the US, advertis

== Changelog ==

= 2.6.7 - 2024-04-16 =
* Dev - Add E2E tests for the integration in the classic product editor.
* Dev - Update e2e test environment to install WooCommerce earlier.
* Fix - Exception in request review.

= 2.6.6 - 2024-04-09 =
* Dev - Add snippet to bypass WooCommerce dependency in E2E tests.
* Tweak - WC 8.8 compatibility.
Expand All @@ -119,8 +124,4 @@ Yes, you can run both at the same time, and we recommend it! In the US, advertis
* Dev - Update test proxy port.
* Tweak - Show Review Inbox Notices when 11 clicks and 1 Conversion.

= 2.6.4 - 2024-03-26 =
* Dev - Add a manual workflow run for PHP unit tests.
* Update - Refactor Product Stats.

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/google-listings-and-ads/trunk/changelog.txt).
3 changes: 2 additions & 1 deletion src/API/Google/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,15 @@ public function account_request_review( $regions ) {
$client = $this->container->get( Client::class );

// For each region we request a new review
foreach ( $regions as $region_code ) {
foreach ( $regions as $region_code => $region_types ) {
$result = $client->post(
$this->get_manager_url( 'account-review-request' ),
[
'body' => json_encode(
[
'accountId' => $this->options->get_merchant_id(),
'regionCode' => $region_code,
'types' => $region_types,
]
),
]
Expand Down
22 changes: 16 additions & 6 deletions src/Google/RequestReviewStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function get_statuses_from_response( array $response ) {
$valid_program_states = [ self::ENABLED, self::NO_OFFERS ];
$review_eligible_regions = [];

foreach ( $response as $program_type ) {
foreach ( $response as $program_type_name => $program_type ) {

// In case any Program is with no offers we consider it Onboarding
if ( $program_type['data']['globalState'] === self::NO_OFFERS ) {
Expand All @@ -54,7 +54,7 @@ public function get_statuses_from_response( array $response ) {
$issues = array_merge( $issues, $region_status['reviewIssues'] ?? [] );
$cooldown = $this->maybe_update_cooldown_period( $region_status, $cooldown );
$status = $this->maybe_update_status( $region_status['eligibilityStatus'], $status );
$review_eligible_regions = $this->maybe_load_eligible_region( $region_status, $review_eligible_regions );
$review_eligible_regions = $this->maybe_load_eligible_region( $region_status, $review_eligible_regions, $program_type_name );
}
}

Expand Down Expand Up @@ -120,18 +120,28 @@ private function maybe_update_status( $new_status, $status ) {
/**
* Updates the regions where a request review is allowed.
*
* @param array $region_status Associative array containing the region eligibility.
* @param array $review_eligible_regions Indexed array with the current eligible regions.
* @param array $region_status Associative array containing the region eligibility.
* @param array $review_eligible_regions Indexed array with the current eligible regions.
* @param "freeListingsProgram"|"shoppingAdsProgram" $type The program type.
*
* @return array The (maybe) modified $review_eligible_regions array
*/
private function maybe_load_eligible_region( array $region_status, array $review_eligible_regions ) {
private function maybe_load_eligible_region( array $region_status, array $review_eligible_regions, string $type = 'freeListingsProgram' ) {
if (
! empty( $region_status['regionCodes'] ) &&
isset( $region_status['reviewEligibilityStatus'] ) &&
$region_status['reviewEligibilityStatus'] === self::ELIGIBLE
) {
array_push( $review_eligible_regions, $region_status['regionCodes'][0] );

sort( $region_status['regionCodes'] ); // sometimes the regions come unsorted between the different programs
$region_id = $region_status['regionCodes'][0];

if ( ! isset( $review_eligible_regions[ $region_id ] ) ) {
$review_eligible_regions[ $region_id ] = [];
}

$review_eligible_regions[ $region_id ][] = strtolower( $type ); // lowercase as is how we expect it in WCS

}

return $review_eligible_regions;
Expand Down
Loading
Loading