Skip to content

Commit

Permalink
Merge branch 'develop' into update/1610-group-variations-when-countin…
Browse files Browse the repository at this point in the history
…g-product-statistics
  • Loading branch information
ianlin committed Nov 10, 2022
2 parents cac5dd0 + b026401 commit 2d9c4a3
Show file tree
Hide file tree
Showing 19 changed files with 108 additions and 88 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: E2E Tests
on:
push:
branches:
- trunk
- develop
- "release/**"
pull_request:
branches:
- "release/**"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![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)
[![PHP Coding Standards](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-coding-standards.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/php-coding-standards.yml)
[![JavaScript and CSS Linting](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-css-linting.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/js-css-linting.yml)
[![E2E Tests](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/e2e-tests.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/e2e-tests.yml)
[![Bundle Size](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/bundle-size.yml/badge.svg)](https://github.com/woocommerce/google-listings-and-ads/actions/workflows/bundle-size.yml)

A native integration with Google offering free listings and Performance Max ads to WooCommerce merchants.
Expand All @@ -30,7 +29,7 @@ If you have a WooCommerce.com account, you can [start a chat or open a ticket on
We aim to support the latest two minor versions of WordPress, WooCommerce, and PHP. (L-2 policy)

- WordPress 5.7+
- WooCommerce 6.0+
- WooCommerce 6.8+
- PHP 7.4+

## Browsers supported
Expand Down Expand Up @@ -160,6 +159,12 @@ To remove the Docker container and images (this will **delete everything** in th

`npm run docker:down`

:warning: Currently, the E2E testing on GitHub Actions is only run automatically after opening a PR with `release/*` branches or pushing changes to `release/*` branches. To run it manually, please visit [here](../../actions/workflows/e2e-tests.yml) and follow [this instruction](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow?tool=webui) to do so.

### Linux Troubleshooting

If you encounter problems starting your `test:e2e`, like `No usable sandbox!` or `UnhandledPromiseRejectionWarning: Error: Page crashed!`, you may try disabling the Chromium sandbox by adding `--no-sandbox` to `launch.args` in [`/tests/e2e/config/jest-puppeteer.config.js#L7`](https://github.com/woocommerce/google-listings-and-ads/blob/develop/tests/e2e/config/jest-puppeteer.config.js#L7).

## Docs

- [Usage Tracking](./src/Tracking/README.md)
Expand Down
21 changes: 21 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
*** WooCommerce Google Listings and Ads Changelog ***

= 2.2.0 - 2022-10-18 =
* Add - Ad previews in the post-onboarding ads setup flow.
* Add - Combine the audience and shipping steps for the onboarding flow and the editing free listings page.
* Add - Streamlined Free Listings + Paid Ads for the onboarding flow.
* Add - The disclaimer of Comparison Shopping Service of the accounts setup of onboarding flow.
* Add - The submission success modal on the Product Feed page after the onboarding is completed along with paid ads setup.
* Fix - A validateDOMNesting warning in the accounts setup step of the onboarding flow.
* Fix - Free Listings + Paid Ads: Add the paid ads previews to the boost product listings section.
* Fix - Remove - Support for WC < 6.8.
* Fix - Shipping time values flash during the onboarding setup.
* Fix - Steppers on the onboarding flow allow switching to later steps when the current step is not yet finished.
* Fix - The "Or, create a new Google Ads account" button at the footer of the Google Ads account setup is clickable when connecting an existing account.
* Fix - The incorrect active status style for a disabled button.
* Tweak - Use different titles for the free listings setup of the onboarding and editing pages.
* Update - Change the steppers in the onboarding flow to only allow going back to the previous steps.
* Update - Detect the verification status of the phone number in the contact information settings.
* Update - Layouts and copywriting of the Get Started page and the onboarding flow.
* Update - Logos of Google Merchant Center and Google Ads.
* Update - Open the billing setup page of Google Ads via a popup window and add an alternative hyperlink to open the same setup page.
* Update - The FAQs in the paid ads setup and the campaign setup page.

= 2.1.4 - 2022-10-04 =
* Add - Policy Compliance Checks in the onboarding flow.
* Tweak - WC 7.0 compatibility.
Expand Down
19 changes: 15 additions & 4 deletions google-listings-and-ads.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* 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.1.4
* Version: 2.2.0
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Text Domain: google-listings-and-ads
* Requires at least: 5.7
* Tested up to: 6.0
* Requires PHP: 7.4
*
* WC requires at least: 6.0
* WC requires at least: 6.8
* WC tested up to: 7.0
* Woo:
*
Expand All @@ -24,13 +24,14 @@
use Automattic\WooCommerce\GoogleListingsAndAds\Internal\Requirements\PluginValidator;
use Automattic\WooCommerce\GoogleListingsAndAds\Internal\Requirements\VersionValidator;
use Automattic\WooCommerce\GoogleListingsAndAds\PluginFactory;
use Automattic\WooCommerce\Utilities\FeaturesUtil;
use Psr\Container\ContainerInterface;

defined( 'ABSPATH' ) || exit;

define( 'WC_GLA_VERSION', '2.1.4' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_VERSION', '2.2.0' ); // WRCS: DEFINED_VERSION.
define( 'WC_GLA_MIN_PHP_VER', '7.4' );
define( 'WC_GLA_MIN_WC_VER', '6.0' );
define( 'WC_GLA_MIN_WC_VER', '6.8' );

// Load and initialize the autoloader.
require_once __DIR__ . '/src/Autoloader.php';
Expand All @@ -51,6 +52,16 @@ function () {
}
);

// HPOS compatibility declaration.
add_action(
'before_woocommerce_init',
function () {
if ( class_exists( FeaturesUtil::class ) ) {
FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ );
}
}
);

// Hook much of our plugin after WooCommerce is loaded.
add_action(
'woocommerce_loaded',
Expand Down
1 change: 0 additions & 1 deletion js/src/components/contact-information/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ const ContactInformation = ( { onPhoneNumberVerified } ) => {
<PhoneNumberCard
view="setup-mc"
phoneNumber={ phone }
initEditing={ null }
onPhoneNumberVerified={ onPhoneNumberVerified }
/>
<StoreAddressCard />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function EditPhoneNumberCard( { phoneNumber, onPhoneNumberVerified } ) {
* @param {string} props.view The view the card is in.
* @param {PhoneNumber} props.phoneNumber Phone number data.
* @param {boolean|null} [props.initEditing=null] Specify the inital UI state.
* `true`: initialize with the editing UI.
* `false`: initialize with the viewing UI.
* `true`: initialize with the editing UI for entering the phone number and proceeding with verification.
* `false`: initialize with the non-editing UI viewing the phone number and a button for switching to the editing UI.
* `null`: determine the initial UI state according to the `data.isVerified` after the `phoneNumber` loaded.
* @param {Function} [props.onEditClick] Called when clicking on "Edit" button.
* If this callback is omitted, it will enter edit mode when clicking on "Edit" button.
Expand All @@ -122,8 +122,8 @@ const PhoneNumberCard = ( {

const { isVerified } = data;

// Handle the initial UI state of `initEditing = null`.
// The `isEditing` state is on hold. Determine it after the `phoneNumber` loaded.
// If the initial value of `isEditing` got from `initEditing` is null, then the `isEditing` state
// is determined after the `phoneNumber` is loaded.
useEffect( () => {
if ( loaded && isEditing === null ) {
setEditing( ! isVerified );
Expand All @@ -134,10 +134,10 @@ const PhoneNumberCard = ( {
// after the phone number is verified. If `initEditing` is false or null, this useEffect handles
// the call of `onPhoneNumberVerified` when the loaded phone number has already been verified.
useEffect( () => {
if ( loaded && initEditing !== true && isVerified ) {
if ( initEditing !== true && isVerified ) {
onPhoneNumberVerifiedRef.current();
}
}, [ loaded, isVerified, initEditing ] );
}, [ initEditing, isVerified ] );

// Return a simple loading AccountCard since the initial edit state is unknown before loaded.
if ( isEditing === null ) {
Expand Down
12 changes: 2 additions & 10 deletions js/src/components/customer-effort-score-prompt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import CustomerEffortScoreDefault, {
CustomerEffortScore,
} from '@woocommerce/customer-effort-score';
import { CustomerEffortScore } from '@woocommerce/customer-effort-score';
import { recordEvent } from '@woocommerce/tracks';

/**
Expand All @@ -14,12 +12,6 @@ import { LOCAL_STORAGE_KEYS } from '.~/constants';
import localStorage from '.~/utils/localStorage';
import useEffectRemoveNotice from '.~/hooks/useEffectRemoveNotice';

// WC 6.6.0 updated the package @woocommerce/customer-effort-score, which does not include a default export anymore, therefore
// breaking the page for newer versions of WC. This is a temporal workaround to be compatible with older WC versions
// and with our L-2 policy.
// See https://github.com/woocommerce/woocommerce/blob/6.6.0/packages/js/customer-effort-score/src/index.ts
const CESComponent = CustomerEffortScoreDefault || CustomerEffortScore;

/**
* CES prompt snackbar open
*
Expand Down Expand Up @@ -95,7 +87,7 @@ const CustomerEffortScorePrompt = ( { eventContext, label } ) => {
};

return (
<CESComponent
<CustomerEffortScore
label={ label }
recordScoreCallback={ recordScore }
onNoticeShownCallback={ onNoticeShown }
Expand Down
4 changes: 2 additions & 2 deletions js/src/gtag-events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ const singleAddToCartClick = function ( event ) {
);
};

// Register for add_to_cart click events.
// Register for add_to_cart click events except for the buttons of Gutenberg blocks.
document.defaultView.addEventListener( 'DOMContentLoaded', function () {
document
.querySelectorAll(
'.add_to_cart_button:not( .product_type_variable ):not( .product_type_grouped )'
'.add_to_cart_button:not( .product_type_variable ):not( .product_type_grouped ):not( .wc-block-components-product-button__button )'
)
.forEach( ( button ) => {
button.addEventListener( 'click', addToCartClick );
Expand Down
41 changes: 9 additions & 32 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "google-listings-and-ads",
"title": "Google Listings and Ads",
"license": "GPL-3.0-or-later",
"version": "2.1.4",
"version": "2.2.0",
"description": "google-listings-and-ads",
"repository": {
"type": "git",
Expand Down
29 changes: 23 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: woocommerce, google, listings, ads
Requires at least: 5.7
Tested up to: 6.0
Requires PHP: 7.4
Stable tag: 2.1.4
Stable tag: 2.2.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -54,7 +54,7 @@ Create a new Google Ads account through Google Listings & Ads and a promotional
= Minimum Requirements =

* WordPress 5.7 or greater
* WooCommerce 6.0 or greater
* WooCommerce 6.8 or greater
* PHP version 7.4 or greater
* MySQL version 5.6 or greater

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

== Changelog ==

= 2.2.0 - 2022-10-18 =
* Add - Ad previews in the post-onboarding ads setup flow.
* Add - Combine the audience and shipping steps for the onboarding flow and the editing free listings page.
* Add - Streamlined Free Listings + Paid Ads for the onboarding flow.
* Add - The disclaimer of Comparison Shopping Service of the accounts setup of onboarding flow.
* Add - The submission success modal on the Product Feed page after the onboarding is completed along with paid ads setup.
* Fix - A validateDOMNesting warning in the accounts setup step of the onboarding flow.
* Fix - Free Listings + Paid Ads: Add the paid ads previews to the boost product listings section.
* Fix - Remove - Support for WC < 6.8.
* Fix - Shipping time values flash during the onboarding setup.
* Fix - Steppers on the onboarding flow allow switching to later steps when the current step is not yet finished.
* Fix - The "Or, create a new Google Ads account" button at the footer of the Google Ads account setup is clickable when connecting an existing account.
* Fix - The incorrect active status style for a disabled button.
* Tweak - Use different titles for the free listings setup of the onboarding and editing pages.
* Update - Change the steppers in the onboarding flow to only allow going back to the previous steps.
* Update - Detect the verification status of the phone number in the contact information settings.
* Update - Layouts and copywriting of the Get Started page and the onboarding flow.
* Update - Logos of Google Merchant Center and Google Ads.
* Update - Open the billing setup page of Google Ads via a popup window and add an alternative hyperlink to open the same setup page.
* Update - The FAQs in the paid ads setup and the campaign setup page.

= 2.1.4 - 2022-10-04 =
* Add - Policy Compliance Checks in the onboarding flow.
* Tweak - WC 7.0 compatibility.
Expand All @@ -118,8 +139,4 @@ Yes, you can run both at the same time, and we recommend it! In the US, advertis
* Fix - Update Size Type Attribute available values.
* Tweak - Update Website not Claimed issue information.

= 2.1.2 - 2022-09-15 =
* Fix - WooCommerce 6.7 compatibility issues.
* Tweak - WC 6.9 compatibility.

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/google-listings-and-ads/trunk/changelog.txt).
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ protected function get_schema_properties(): array {
'type' => 'string',
'description' => __( 'The verification status of the phone number associated with the Merchant Center account.', 'google-listings-and-ads' ),
'context' => [ 'view' ],
'enum' => [ 'verified', 'unverified' ],
],
'mc_address' => [
'type' => 'object',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*
* Contains AbstractBatchedActionSchedulerJob methods.
*
* @since x.x.x
* @since 2.2.0
*/
trait SyncableProductsBatchedActionSchedulerJobTrait {

Expand Down
Loading

0 comments on commit 2d9c4a3

Please sign in to comment.