diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78004fcf30..1a957b7ef0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,8 +55,10 @@ jobs: - name: Prepare BundleWatch env values - pull request if: ${{ github.event_name == 'pull_request' }} + env: + HEAD_REF: ${{ github.head_ref }} run: | - echo "CI_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV + echo "CI_BRANCH=${HEAD_REF}" >> $GITHUB_ENV echo "CI_BRANCH_BASE=${{ github.base_ref }}" >> $GITHUB_ENV echo "CI_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 583b7c345e..605321bf20 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -50,14 +50,18 @@ jobs: - name: Install WP release candidate (optional) if: github.event.inputs.wp-rc-version != '' + env: + INPUT_WP_RC_VERSION: ${{ github.event.inputs.wp-rc-version }} run: | - npm run -- wp-env run tests-cli -- wp core update --version=${{ github.event.inputs.wp-rc-version }} + npm run -- wp-env run tests-cli -- wp core update --version="${INPUT_WP_RC_VERSION}" npm run -- wp-env run tests-cli -- wp core update-db - name: Install WC release candidate (optional) if: github.event.inputs.wc-rc-version != '' + env: + INPUT_WC_RC_VERSION: ${{ github.event.inputs.wc-rc-version }} run: | - npm run -- wp-env run tests-cli -- wp plugin update woocommerce --version=${{ github.event.inputs.wc-rc-version }} + npm run -- wp-env run tests-cli -- wp plugin update woocommerce --version="${INPUT_WC_RC_VERSION}" npm run -- wp-env run tests-cli -- wp wc update - name: Download and install Chromium browser. diff --git a/.github/workflows/php-hook-documentation.yml b/.github/workflows/php-hook-documentation.yml index dffb718b3b..def712f287 100644 --- a/.github/workflows/php-hook-documentation.yml +++ b/.github/workflows/php-hook-documentation.yml @@ -31,6 +31,8 @@ jobs: source-directories: src/,views/,google-listings-and-ads.php,uninstall.php - name: Commit hook documentation + env: + HEAD_REF: ${{ github.head_ref }} shell: bash # Use the github-actions bot account to commit. # https://api.github.com/users/github-actions%5Bbot%5D @@ -43,6 +45,6 @@ jobs: echo "*No documentation changes to commit.*" >> $GITHUB_STEP_SUMMARY else echo "*Committing documentation changes.*" >> $GITHUB_STEP_SUMMARY - git commit -q -m "Update hooks documentation from ${{ github.head_ref }} branch." + git commit -q -m "Update hooks documentation from ${HEAD_REF} branch." git push fi diff --git a/.github/workflows/php-unit-tests.yml b/.github/workflows/php-unit-tests.yml index d4b0facbaf..ad898c3bc7 100644 --- a/.github/workflows/php-unit-tests.yml +++ b/.github/workflows/php-unit-tests.yml @@ -132,7 +132,10 @@ jobs: uses: woocommerce/grow/prepare-mysql@actions-v1 - name: Install WP tests - run: ./bin/install-wp-tests.sh wordpress_test root root localhost ${{ inputs.wp-rc-version }} ${{ inputs.wc-rc-version }} + env: + INPUT_WP_RC_VERSION: ${{ inputs.wp-rc-version }} + INPUT_WC_RC_VERSION: ${{ inputs.wc-rc-version }} + run: ./bin/install-wp-tests.sh wordpress_test root root localhost "${INPUT_WP_RC_VERSION}" "${INPUT_WC_RC_VERSION}" - name: Run PHP unit tests run: composer test-unit diff --git a/.wp-env.json b/.wp-env.json index d4cc16981e..85fccae4da 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,7 +1,6 @@ { "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", diff --git a/bin/GoogleAdsCleanupServices.php b/bin/GoogleAdsCleanupServices.php index 99493195ff..3a50c91855 100644 --- a/bin/GoogleAdsCleanupServices.php +++ b/bin/GoogleAdsCleanupServices.php @@ -26,7 +26,7 @@ class GoogleAdsCleanupServices { * * @var string */ - protected $version = 'V14'; + protected $version = 'V16'; /** * @var Event Composer event. @@ -48,11 +48,18 @@ class GoogleAdsCleanupServices { */ protected $code_path = null; + /** + * @var string[] List of Service to NOT remove even when usage is not found. + */ + protected $avoid_cleanup = [ + 'ExtensionFeedItem', + ]; + /** * Constructor. * * @param Event|null $event Composer event. - * @param string|null $path Path of the Ads library. + * @param string|null $path Path of the Ads library. */ public function __construct( Event $event = null, string $path = null ) { $this->event = $event; @@ -92,7 +99,10 @@ protected function remove_services() { $used = array_unique( array_merge( $this->find_used_pattern( - "use Google\\\\Ads\\\\GoogleAds\\\\{$this->version}\\\\Services\\\\([A-Za-z0-9]+)ServiceClient;" + "use Google\\\\Ads\\\\GoogleAds\\\\{$this->version}\\\\Services\\\\Client\\\\([A-Za-z0-9]+)ServiceClient;" + ), + $this->find_used_pattern( + "use Google\\\\Ads\\\\GoogleAds\\\\{$this->version}\\\\Services\\\\([A-Za-z0-9]+);" ), $this->find_used_pattern( "use Google\\\\Ads\\\\GoogleAds\\\\{$this->version}\\\\Resources\\\\([A-Za-z0-9]+);" @@ -111,6 +121,11 @@ protected function remove_services() { * @param string $service Service name. */ protected function remove_service( string $service ) { + if ( in_array( $service, $this->avoid_cleanup, true ) ) { + $this->output_text( "Skip Removing service {$service}" ); + return; + } + $this->output_text( "Removing service {$service}" ); $this->src_path = '/src/Google/Ads/GoogleAds'; @@ -185,8 +200,9 @@ protected function remove_enum( string $enum_name ) { /** * Find a list of files in a path, including subdirectories, matching a pattern. * - * @param string $path Package path + * @param string $path Package path * @param string $pattern Regex pattern to match + * * @return array Matching files */ protected function get_dir_contents( $path, $pattern ) { @@ -243,7 +259,7 @@ protected function find_used_pattern( string $pattern ): array { * Find a specific filename pattern within the library. * * @param string $pattern Regexp pattern to match. - * @param string|null $suffix Suffix to remove from filename. + * @param string|null $suffix Suffix to remove from filename. * * @return array List of matched names. */ @@ -257,6 +273,7 @@ protected function find_library_file_pattern( string $pattern, string $suffix = return array_map( function ( $file ) use ( $suffix ) { $name = pathinfo( $file, PATHINFO_FILENAME ); + return $suffix ? $this->remove_suffix( $suffix, $name ) : $name; }, $output @@ -267,7 +284,7 @@ function ( $file ) use ( $suffix ) { * Optionally remove a suffix from a string. * * @param string $suffix Suffix to remove. - * @param string $text Text to remove the suffix from. + * @param string $text Text to remove the suffix from. * * @return string */ @@ -282,7 +299,7 @@ protected function remove_suffix( string $suffix, string $text ): string { * @param string $name */ protected function remove_use_statement( string $file, string $name ) { - $pattern = '/\s*use\s+[\w\d\\\]+' . preg_quote( $name, '/' ) . ';/'; + $pattern = '/\s*use\s+[\w\d\\\]+\\\{1}' . preg_quote( $name, '/' ) . ';/'; $this->remove_pattern( $file, $pattern ); } @@ -296,6 +313,7 @@ protected function remove_function( string $file, string $name ) { $file = $this->file_path( $file ); if ( ! file_exists( $file ) ) { $this->warning( sprintf( 'File does not exist: %s', $file ) ); + return; } @@ -304,6 +322,7 @@ protected function remove_function( string $file, string $name ) { $pattern = '/function ' . preg_quote( $name, '/' ) . '\(/'; if ( ! preg_match( $pattern, $contents, $matches, PREG_OFFSET_CAPTURE ) ) { $this->warning( sprintf( 'Function %s not found in %s', $name, $file ) ); + return; } @@ -329,6 +348,7 @@ protected function remove_function( string $file, string $name ) { if ( false === $start || 0 > $start || $end >= $length ) { $this->warning( sprintf( 'Function %s not found in %s', $name, $file ) ); + return; } @@ -342,6 +362,7 @@ protected function remove_function( string $file, string $name ) { if ( empty( $new ) ) { $this->warning( sprintf( 'Replace failed for function %s in %s', $name, $file ) ); + return; } @@ -358,18 +379,21 @@ protected function remove_pattern( string $file, string $pattern ) { $file = $this->file_path( $file ); if ( ! file_exists( $file ) ) { $this->warning( sprintf( 'File does not exist: %s', $file ) ); + return; } $contents = file_get_contents( $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions if ( ! preg_match( $pattern, $contents, $matches ) ) { $this->warning( sprintf( 'Pattern %s not found in %s', $pattern, $file ) ); + return; } $new = preg_replace( $pattern, '', $contents ); if ( empty( $new ) ) { $this->warning( sprintf( 'Replace failed for pattern %s in %s', $pattern, $file ) ); + return; } @@ -385,6 +409,7 @@ protected function remove_file( string $file ) { $file = $this->file_path( $file ); if ( ! file_exists( $file ) ) { $this->warning( sprintf( 'File does not exist: %s', $file ) ); + return; } @@ -400,10 +425,26 @@ protected function remove_directory( string $directory ) { $directory = $this->file_path( $directory ); if ( ! is_dir( $directory ) ) { $this->warning( sprintf( 'Directory does not exist: %s', $directory ) ); + return; } - rmdir( $directory ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_rmdir + if ( $this->is_empty_directory( $directory ) ) { + rmdir( $directory ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_rmdir + } else { + $this->warning( sprintf( 'Directory not empty: %s', $directory ) ); + } + } + + /** + * Check if a directory is empty + * + * @param string $directory + * + * @return bool True if empty + */ + protected function is_empty_directory( string $directory ): bool { + return ( count( scandir( $directory ) ) === 2 ); } /** diff --git a/changelog.txt b/changelog.txt index c3bc4f86d3..1b89029c2a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ *** WooCommerce Google Listings and Ads Changelog *** += 2.7.0 - 2024-05-14 = +* Fix - Convert `lbs` to `lb` when mapping WC products to Google products. +* Fix - E2E tests +* Tweak - WC 8.9 compatibility. +* Update - Update Google API to V16. + = 2.6.9 - 2024-05-07 = * Tweak - Confirm issues are present when retrieving product status. diff --git a/composer.json b/composer.json index 633ee8fdab..c2c837aa43 100644 --- a/composer.json +++ b/composer.json @@ -10,9 +10,9 @@ "automattic/jetpack-autoloader": "^3.0", "automattic/jetpack-config": "^2.0", "automattic/jetpack-connection": "^2.3", - "google/apiclient": "^2.15", - "google/apiclient-services": "~0.312", - "googleads/google-ads-php": "^19.2", + "google/apiclient": "^2.16", + "google/apiclient-services": "^0.350.0", + "googleads/google-ads-php": "dev-legacy-v22.1.0", "league/container": "^3.4", "league/iso3166": "^4.1", "phpseclib/bcmath_compat": "^2.0", @@ -23,6 +23,7 @@ }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^v0.7", + "dg/bypass-finals": "^1.6", "phpunit/phpunit": "^9.5", "wp-cli/i18n-command": "^2.2", "wp-coding-standards/wpcs": "^3.0", @@ -62,7 +63,7 @@ "Google\\Task\\Composer::cleanup", "Automattic\\WooCommerce\\GoogleListingsAndAds\\Util\\SymfonyPolyfillCleanup::remove", "Automattic\\WooCommerce\\GoogleListingsAndAds\\Util\\GoogleAdsCleanupServices::remove", - "composer run-script remove-google-ads-api-version-support -- 11 12 13", + "composer run-script remove-google-ads-api-version-support -- 14 15", "php ./bin/prefix-vendor-namespace.php", "bash ./bin/cleanup-vendor-files.sh", "composer dump-autoload" diff --git a/composer.lock b/composer.lock index 31fcf9ceda..5b4a81cef5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f5d792942004e9483018be005ffee7e9", + "content-hash": "dc1c866ff5a5faf503e7f4899f251f63", "packages": [ { "name": "automattic/jetpack-a8c-mc-stats", @@ -561,31 +561,31 @@ }, { "name": "google/apiclient", - "version": "v2.15.3", + "version": "v2.16.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client.git", - "reference": "e70273c06d18824de77e114247ae3102f8aec64d" + "reference": "017400f609c1fb71ab5ad824c50eabd4c3eaf779" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/e70273c06d18824de77e114247ae3102f8aec64d", - "reference": "e70273c06d18824de77e114247ae3102f8aec64d", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/017400f609c1fb71ab5ad824c50eabd4c3eaf779", + "reference": "017400f609c1fb71ab5ad824c50eabd4c3eaf779", "shasum": "" }, "require": { "firebase/php-jwt": "~6.0", - "google/apiclient-services": "~0.200", - "google/auth": "^1.33", + "google/apiclient-services": "~0.350", + "google/auth": "^1.37", "guzzlehttp/guzzle": "^6.5.8||^7.4.5", - "guzzlehttp/psr7": "^1.8.4||^2.2.1", + "guzzlehttp/psr7": "^1.9.1||^2.2.1", "monolog/monolog": "^2.9||^3.0", "php": "^7.4|^8.0", - "phpseclib/phpseclib": "^3.0.34" + "phpseclib/phpseclib": "^3.0.36" }, "require-dev": { "cache/filesystem-adapter": "^1.1", - "composer/composer": "^1.10.22", + "composer/composer": "^1.10.23", "phpcompatibility/php-compatibility": "^9.2", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", @@ -624,22 +624,22 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client/issues", - "source": "https://github.com/googleapis/google-api-php-client/tree/v2.15.3" + "source": "https://github.com/googleapis/google-api-php-client/tree/v2.16.0" }, - "time": "2024-01-04T19:15:22+00:00" + "time": "2024-04-24T00:59:47+00:00" }, { "name": "google/apiclient-services", - "version": "v0.331.0", + "version": "v0.350.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "94d0bcc1827f6ea24274fe17ece0930ae2a8f51d" + "reference": "a053f7dd118e46845fcefa9036c5b97b1050dfaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/94d0bcc1827f6ea24274fe17ece0930ae2a8f51d", - "reference": "94d0bcc1827f6ea24274fe17ece0930ae2a8f51d", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/a053f7dd118e46845fcefa9036c5b97b1050dfaa", + "reference": "a053f7dd118e46845fcefa9036c5b97b1050dfaa", "shasum": "" }, "require": { @@ -668,27 +668,27 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.331.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.350.0" }, - "time": "2024-01-05T01:04:19+00:00" + "time": "2024-04-23T21:58:18+00:00" }, { "name": "google/auth", - "version": "v1.34.0", + "version": "v1.37.1", "source": { "type": "git", "url": "https://github.com/googleapis/google-auth-library-php.git", - "reference": "155daeadfd2f09743f611ea493b828d382519575" + "reference": "1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/155daeadfd2f09743f611ea493b828d382519575", - "reference": "155daeadfd2f09743f611ea493b828d382519575", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46", + "reference": "1a7de77b72e6ac60dccf0e6478c4c1005bb0ff46", "shasum": "" }, "require": { "firebase/php-jwt": "^6.0", - "guzzlehttp/guzzle": "^6.2.1|^7.0", + "guzzlehttp/guzzle": "^6.5.8||^7.4.5", "guzzlehttp/psr7": "^2.4.5", "php": "^7.4||^8.0", "psr/cache": "^1.0||^2.0||^3.0", @@ -726,22 +726,22 @@ "support": { "docs": "https://googleapis.github.io/google-auth-library-php/main/", "issues": "https://github.com/googleapis/google-auth-library-php/issues", - "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.34.0" + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.37.1" }, - "time": "2024-01-03T20:45:15+00:00" + "time": "2024-04-03T18:41:12+00:00" }, { "name": "google/common-protos", - "version": "v4.4.0", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/googleapis/common-protos-php.git", - "reference": "04b6c213e0add963dab058329caf2d2d9014129a" + "reference": "dfc232e90823cedca107b56e7371f2e2f35b9427" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/04b6c213e0add963dab058329caf2d2d9014129a", - "reference": "04b6c213e0add963dab058329caf2d2d9014129a", + "url": "https://api.github.com/repos/googleapis/common-protos-php/zipball/dfc232e90823cedca107b56e7371f2e2f35b9427", + "reference": "dfc232e90823cedca107b56e7371f2e2f35b9427", "shasum": "" }, "require": { @@ -778,30 +778,30 @@ ], "support": { "issues": "https://github.com/googleapis/common-protos-php/issues", - "source": "https://github.com/googleapis/common-protos-php/tree/v4.4.0" + "source": "https://github.com/googleapis/common-protos-php/tree/v4.5.0" }, - "time": "2023-10-02T18:14:18+00:00" + "time": "2023-11-29T21:08:16+00:00" }, { "name": "google/gax", - "version": "v1.25.0", + "version": "v1.29.1", "source": { "type": "git", "url": "https://github.com/googleapis/gax-php.git", - "reference": "8f07f56f8d14e784777020cd73cfde518bd7dd33" + "reference": "54a863e63ee318308637adb283f6157ccc3aabbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/gax-php/zipball/8f07f56f8d14e784777020cd73cfde518bd7dd33", - "reference": "8f07f56f8d14e784777020cd73cfde518bd7dd33", + "url": "https://api.github.com/repos/googleapis/gax-php/zipball/54a863e63ee318308637adb283f6157ccc3aabbb", + "reference": "54a863e63ee318308637adb283f6157ccc3aabbb", "shasum": "" }, "require": { - "google/auth": "^1.25.0", - "google/common-protos": "^3.0||^4.0", + "google/auth": "^1.34.0", + "google/common-protos": "^4.4", "google/grpc-gcp": "^0.2||^0.3", - "google/longrunning": "^0.2", - "google/protobuf": "^3.21.4", + "google/longrunning": "~0.2", + "google/protobuf": "^3.22", "grpc/grpc": "^1.13", "guzzlehttp/promises": "^1.4||^2.0", "guzzlehttp/psr7": "^2.0", @@ -833,26 +833,26 @@ ], "support": { "issues": "https://github.com/googleapis/gax-php/issues", - "source": "https://github.com/googleapis/gax-php/tree/v1.25.0" + "source": "https://github.com/googleapis/gax-php/tree/v1.29.1" }, - "time": "2023-11-02T22:05:32+00:00" + "time": "2024-02-26T19:15:41+00:00" }, { "name": "google/longrunning", - "version": "v0.2.6", + "version": "0.4.1", "source": { "type": "git", "url": "https://github.com/googleapis/php-longrunning.git", - "reference": "9689b4db54cf4cf8186118d9d59aa9ba35bb5842" + "reference": "67b80d36df06eaf5000fea010c77307e72fa0985" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/9689b4db54cf4cf8186118d9d59aa9ba35bb5842", - "reference": "9689b4db54cf4cf8186118d9d59aa9ba35bb5842", + "url": "https://api.github.com/repos/googleapis/php-longrunning/zipball/67b80d36df06eaf5000fea010c77307e72fa0985", + "reference": "67b80d36df06eaf5000fea010c77307e72fa0985", "shasum": "" }, "require-dev": { - "google/gax": "^1.13.0", + "google/gax": "^1.30", "phpunit/phpunit": "^9.0" }, "type": "library", @@ -877,22 +877,22 @@ ], "description": "Google LongRunning Client for PHP", "support": { - "source": "https://github.com/googleapis/php-longrunning/tree/v0.2.6" + "source": "https://github.com/googleapis/php-longrunning/tree/v0.4.1" }, - "time": "2023-04-21T14:12:59+00:00" + "time": "2024-04-19T22:39:11+00:00" }, { "name": "google/protobuf", - "version": "v3.25.0", + "version": "v3.25.3", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "e5a021e653ee3a7a78760caefa605b4ec31bba80" + "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/e5a021e653ee3a7a78760caefa605b4ec31bba80", - "reference": "e5a021e653ee3a7a78760caefa605b4ec31bba80", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/983a87f4f8798a90ca3a25b0f300b8fda38df643", + "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643", "shasum": "" }, "require": { @@ -921,26 +921,26 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.0" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.3" }, - "time": "2023-11-01T22:12:38+00:00" + "time": "2024-02-15T21:11:49+00:00" }, { "name": "googleads/google-ads-php", - "version": "v19.2.0", + "version": "dev-legacy-v22.1.0", "source": { "type": "git", "url": "https://github.com/googleads/google-ads-php.git", - "reference": "2ae4c1b81bb4792e4711dcf150faddba80e9bdf0" + "reference": "905fd78217c76ba4e6a9fe4a84ca22d10135a23e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleads/google-ads-php/zipball/2ae4c1b81bb4792e4711dcf150faddba80e9bdf0", - "reference": "2ae4c1b81bb4792e4711dcf150faddba80e9bdf0", + "url": "https://api.github.com/repos/googleads/google-ads-php/zipball/905fd78217c76ba4e6a9fe4a84ca22d10135a23e", + "reference": "905fd78217c76ba4e6a9fe4a84ca22d10135a23e", "shasum": "" }, "require": { - "google/gax": "^1.13.0", + "google/gax": "^1.19.1", "google/protobuf": "^3.21.5", "grpc/grpc": "^1.36.0", "monolog/monolog": "^1.26 || ^2.0 || ^3.0", @@ -984,9 +984,9 @@ "homepage": "https://github.com/googleads/google-ads-php", "support": { "issues": "https://github.com/googleads/google-ads-php/issues", - "source": "https://github.com/googleads/google-ads-php/tree/v19.2.0" + "source": "https://github.com/googleads/google-ads-php/tree/legacy-v22.1.0" }, - "time": "2023-06-08T14:17:45+00:00" + "time": "2024-03-11T14:49:29+00:00" }, { "name": "guzzlehttp/guzzle", @@ -1452,16 +1452,16 @@ }, { "name": "monolog/monolog", - "version": "2.9.2", + "version": "2.9.3", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", "shasum": "" }, "require": { @@ -1482,8 +1482,8 @@ "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", @@ -1538,7 +1538,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.2" + "source": "https://github.com/Seldaek/monolog/tree/2.9.3" }, "funding": [ { @@ -1550,7 +1550,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T15:25:26+00:00" + "time": "2024-04-12T20:52:51+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -2194,16 +2194,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { @@ -2241,7 +2241,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" }, "funding": [ { @@ -2257,20 +2257,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-01-24T14:02:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -2284,9 +2284,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2323,7 +2320,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -2339,20 +2336,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -2363,9 +2360,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2407,7 +2401,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -2423,20 +2417,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -2450,9 +2444,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2490,7 +2481,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -2506,7 +2497,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php73", @@ -2589,16 +2580,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -2606,9 +2597,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2652,7 +2640,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -2668,20 +2656,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", + "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", "shasum": "" }, "require": { @@ -2689,9 +2677,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2731,7 +2716,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" }, "funding": [ { @@ -2747,7 +2732,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/translation-contracts", @@ -3016,6 +3001,59 @@ }, "time": "2022-02-04T12:51:07+00:00" }, + { + "name": "dg/bypass-finals", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/dg/bypass-finals.git", + "reference": "efe2fe04bae9f0de271dd462afc049067889e6d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dg/bypass-finals/zipball/efe2fe04bae9f0de271dd462afc049067889e6d1", + "reference": "efe2fe04bae9f0de271dd462afc049067889e6d1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "nette/tester": "^2.3", + "phpstan/phpstan": "^0.12" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0", + "GPL-3.0" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + } + ], + "description": "Removes final keyword from source code on-the-fly and allows mocking of final methods and classes", + "keywords": [ + "finals", + "mocking", + "phpunit", + "testing", + "unit" + ], + "support": { + "issues": "https://github.com/dg/bypass-finals/issues", + "source": "https://github.com/dg/bypass-finals/tree/v1.6.0" + }, + "time": "2023-11-19T22:19:30+00:00" + }, { "name": "doctrine/instantiator", "version": "1.5.0", @@ -5697,7 +5735,9 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "googleads/google-ads-php": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/google-listings-and-ads.php b/google-listings-and-ads.php index c05e4c1ed7..78fde67061 100644 --- a/google-listings-and-ads.php +++ b/google-listings-and-ads.php @@ -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.9 + * Version: 2.7.0 * Author: WooCommerce * Author URI: https://woo.com/ * Text Domain: google-listings-and-ads @@ -13,7 +13,7 @@ * Requires PHP Architecture: 64 bits * Requires Plugins: woocommerce * WC requires at least: 6.9 - * WC tested up to: 8.8 + * WC tested up to: 8.9 * Woo: * * @package WooCommerce\Admin @@ -30,7 +30,7 @@ defined( 'ABSPATH' ) || exit; -define( 'WC_GLA_VERSION', '2.6.9' ); // WRCS: DEFINED_VERSION. +define( 'WC_GLA_VERSION', '2.7.0' ); // WRCS: DEFINED_VERSION. define( 'WC_GLA_MIN_PHP_VER', '7.4' ); define( 'WC_GLA_MIN_WC_VER', '6.9' ); diff --git a/package-lock.json b/package-lock.json index 5f580dd182..b6b3c92a21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "google-listings-and-ads", - "version": "2.6.9", + "version": "2.7.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index fced73cc5a..3955310c27 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "google-listings-and-ads", "title": "Google Listings and Ads", - "version": "2.6.9", + "version": "2.7.0", "description": "google-listings-and-ads", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/readme.txt b/readme.txt index 2675a44696..aa1fc6b209 100644 --- a/readme.txt +++ b/readme.txt @@ -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.9 +Stable tag: 2.7.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -111,6 +111,12 @@ Yes, you can run both at the same time, and we recommend it! In the US, advertis == Changelog == += 2.7.0 - 2024-05-14 = +* Fix - Convert `lbs` to `lb` when mapping WC products to Google products. +* Fix - E2E tests +* Tweak - WC 8.9 compatibility. +* Update - Update Google API to V16. + = 2.6.9 - 2024-05-07 = * Tweak - Confirm issues are present when retrieving product status. @@ -119,9 +125,4 @@ Yes, you can run both at the same time, and we recommend it! In the US, advertis * Tweak - Update tags in readme.txt. * Update - Restrict product types to be limited to only 10 when converting from categories. -= 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. - [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/google-listings-and-ads/trunk/changelog.txt). diff --git a/src/API/Google/Ads.php b/src/API/Google/Ads.php index 5f5f2ef54c..29488b2ca9 100644 --- a/src/API/Google/Ads.php +++ b/src/API/Google/Ads.php @@ -6,18 +6,19 @@ use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsAccountAccessQuery; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsAccountQuery; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsBillingStatusQuery; +use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsProductLinkInvitationQuery; use Automattic\WooCommerce\GoogleListingsAndAds\Exception\ExceptionWithResponseData; use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsInterface; use Exception; -use Google\Ads\GoogleAds\Util\FieldMasks; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Enums\AccessRoleEnum\AccessRole; -use Google\Ads\GoogleAds\V14\Enums\MerchantCenterLinkStatusEnum\MerchantCenterLinkStatus; -use Google\Ads\GoogleAds\V14\Resources\MerchantCenterLink; -use Google\Ads\GoogleAds\V14\Services\MerchantCenterLinkOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Enums\AccessRoleEnum\AccessRole; +use Google\Ads\GoogleAds\V16\Enums\ProductLinkInvitationStatusEnum\ProductLinkInvitationStatus; +use Google\Ads\GoogleAds\V16\Resources\ProductLinkInvitation; +use Google\Ads\GoogleAds\V16\Services\ListAccessibleCustomersRequest; +use Google\Ads\GoogleAds\V16\Services\UpdateProductLinkInvitationRequest; use Google\ApiCore\ApiException; use Google\ApiCore\ValidationException; @@ -57,7 +58,7 @@ public function __construct( GoogleAdsClient $client ) { */ public function get_ads_accounts(): array { try { - $customers = $this->client->getCustomerServiceClient()->listAccessibleCustomers(); + $customers = $this->client->getCustomerServiceClient()->listAccessibleCustomers( new ListAccessibleCustomersRequest() ); $accounts = []; foreach ( $customers->getResourceNames() as $name ) { @@ -128,22 +129,16 @@ public function get_billing_status(): string { * @throws Exception When a link is unavailable. */ public function accept_merchant_link( int $merchant_id ) { - $link = $this->get_merchant_link( $merchant_id ); - - if ( $link->getStatus() === MerchantCenterLinkStatus::ENABLED ) { + $link = $this->get_merchant_link( $merchant_id ); + $link_status = $link->getStatus(); + if ( $link_status === ProductLinkInvitationStatus::ACCEPTED ) { return; } - - $link->setStatus( MerchantCenterLinkStatus::ENABLED ); - - $operation = new MerchantCenterLinkOperation(); - $operation->setUpdate( $link ); - $operation->setUpdateMask( FieldMasks::allSetFieldsOf( $link ) ); - - $this->client->getMerchantCenterLinkServiceClient()->mutateMerchantCenterLink( - $this->options->get_ads_id(), - $operation - ); + $request = new UpdateProductLinkInvitationRequest(); + $request->setCustomerId( $this->options->get_ads_id() ); + $request->setResourceName( $link->getResourceName() ); + $request->setProductLinkInvitationStatus( ProductLinkInvitationStatus::ACCEPTED ); + $this->client->getProductLinkInvitationServiceClient()->updateProductLinkInvitation( $request ); } /** @@ -306,17 +301,20 @@ private function get_account_details( string $account ): ?array { * * @param int $merchant_id Merchant Center account id. * - * @return MerchantCenterLink + * @return ProductLinkInvitation * @throws Exception When the merchant link hasn't been created. */ - private function get_merchant_link( int $merchant_id ): MerchantCenterLink { - $response = $this->client->getMerchantCenterLinkServiceClient()->listMerchantCenterLinks( - $this->options->get_ads_id() - ); - - foreach ( $response->getMerchantCenterLinks() as $link ) { - /** @var MerchantCenterLink $link */ - if ( $merchant_id === absint( $link->getId() ) ) { + private function get_merchant_link( int $merchant_id ): ProductLinkInvitation { + $res = ( new AdsProductLinkInvitationQuery() ) + ->set_client( $this->client, $this->options->get_ads_id() ) + ->where( 'product_link_invitation.status', [ ProductLinkInvitationStatus::name( ProductLinkInvitationStatus::ACCEPTED ), ProductLinkInvitationStatus::name( ProductLinkInvitationStatus::PENDING_APPROVAL ) ], 'IN' ) + ->get_results(); + + foreach ( $res->iterateAllElements() as $row ) { + $link = $row->getProductLinkInvitation(); + $mc = $link->getMerchantCenter(); + $mc_id = $mc->getMerchantCenterId(); + if ( absint( $mc_id ) === $merchant_id ) { return $link; } } diff --git a/src/API/Google/AdsAsset.php b/src/API/Google/AdsAsset.php index 857e3bc9ae..116ed0b6e8 100644 --- a/src/API/Google/AdsAsset.php +++ b/src/API/Google/AdsAsset.php @@ -6,15 +6,16 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Enums\AssetTypeEnum\AssetType; -use Google\Ads\GoogleAds\V14\Resources\Asset; -use Google\Ads\GoogleAds\V14\Services\AssetOperation; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Common\TextAsset; -use Google\Ads\GoogleAds\V14\Common\ImageAsset; -use Google\Ads\GoogleAds\V14\Common\CallToActionAsset; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Enums\AssetTypeEnum\AssetType; +use Google\Ads\GoogleAds\V16\Resources\Asset; +use Google\Ads\GoogleAds\V16\Services\AssetOperation; +use Google\Ads\GoogleAds\V16\Services\MutateGoogleAdsRequest; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Common\TextAsset; +use Google\Ads\GoogleAds\V16\Common\ImageAsset; +use Google\Ads\GoogleAds\V16\Common\CallToActionAsset; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WP; use Google\ApiCore\ApiException; use Exception; @@ -295,11 +296,11 @@ public function convert_asset( GoogleAdsRow $row ): array { * @throws ApiException If any of the operations fail. */ protected function mutate( array $operations ): array { - $arns = []; - $responses = $this->client->getGoogleAdsServiceClient()->mutate( - $this->options->get_ads_id(), - $operations - ); + $arns = []; + $request = new MutateGoogleAdsRequest(); + $request->setCustomerId( $this->options->get_ads_id() ); + $request->setMutateOperations( $operations ); + $responses = $this->client->getGoogleAdsServiceClient()->mutate( $request ); foreach ( $responses->getMutateOperationResponses() as $response ) { if ( 'asset_result' === $response->getResponse() ) { diff --git a/src/API/Google/AdsAssetGroup.php b/src/API/Google/AdsAssetGroup.php index ed5e1c6529..e3c0d9e31e 100644 --- a/src/API/Google/AdsAssetGroup.php +++ b/src/API/Google/AdsAssetGroup.php @@ -4,21 +4,21 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsAssetGroupQuery; -use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query\AdsListingGroupFilterQuery; use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Enums\AssetGroupStatusEnum\AssetGroupStatus; -use Google\Ads\GoogleAds\V14\Enums\ListingGroupFilterTypeEnum\ListingGroupFilterType; -use Google\Ads\GoogleAds\V14\Enums\ListingGroupFilterVerticalEnum\ListingGroupFilterVertical; -use Google\Ads\GoogleAds\V14\Resources\AssetGroup; -use Google\Ads\GoogleAds\V14\Resources\AssetGroupListingGroupFilter; -use Google\Ads\GoogleAds\V14\Services\AssetGroupListingGroupFilterOperation; -use Google\Ads\GoogleAds\V14\Services\AssetGroupOperation; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; -use Google\Ads\GoogleAds\V14\Services\AssetGroupServiceClient; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Enums\ListingGroupFilterListingSourceEnum\ListingGroupFilterListingSource; +use Google\Ads\GoogleAds\V16\Enums\AssetGroupStatusEnum\AssetGroupStatus; +use Google\Ads\GoogleAds\V16\Enums\ListingGroupFilterTypeEnum\ListingGroupFilterType; +use Google\Ads\GoogleAds\V16\Resources\AssetGroup; +use Google\Ads\GoogleAds\V16\Resources\AssetGroupListingGroupFilter; +use Google\Ads\GoogleAds\V16\Services\AssetGroupListingGroupFilterOperation; +use Google\Ads\GoogleAds\V16\Services\AssetGroupOperation; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\MutateGoogleAdsRequest; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; +use Google\Ads\GoogleAds\V16\Services\Client\AssetGroupServiceClient; use Google\ApiCore\ApiException; use Google\ApiCore\ValidationException; use Google\Protobuf\FieldMask; @@ -149,23 +149,6 @@ public function create_operations( string $campaign_resource_name, string $asset ]; } - /** - * Returns a set of operations to delete an asset group. - * - * @param string $campaign_resource_name - * @return array - */ - public function delete_operations( string $campaign_resource_name ): array { - $asset_group_operations = $this->asset_group_delete_operations( $campaign_resource_name ); - $listing_group_operations = $this->listing_group_delete_operations(); - - // All assets must be deleted from the group before deleting the asset group. - return array_merge( - $listing_group_operations, - $asset_group_operations - ); - } - /** * Returns an asset group create operation. * @@ -196,9 +179,9 @@ protected function asset_group_create_operation( string $campaign_resource_name, protected function listing_group_create_operation(): MutateOperation { $listing_group = new AssetGroupListingGroupFilter( [ - 'asset_group' => $this->temporary_resource_name(), - 'type' => ListingGroupFilterType::UNIT_INCLUDED, - 'vertical' => ListingGroupFilterVertical::SHOPPING, + 'asset_group' => $this->temporary_resource_name(), + 'type' => ListingGroupFilterType::UNIT_INCLUDED, + 'listing_source' => ListingGroupFilterListingSource::SHOPPING, ] ); @@ -233,32 +216,6 @@ protected function asset_group_delete_operations( string $campaign_resource_name return $operations; } - /** - * Returns an asset group listing group filter delete operation. - * - * @return MutateOperation[] - */ - protected function listing_group_delete_operations(): array { - if ( empty( $this->asset_groups ) ) { - return []; - } - - $operations = []; - $results = ( new AdsListingGroupFilterQuery() ) - ->set_client( $this->client, $this->options->get_ads_id() ) - ->where( 'asset_group_listing_group_filter.asset_group', $this->asset_groups, 'IN' ) - ->get_results(); - - /** @var GoogleAdsRow $row */ - foreach ( $results->iterateAllElements() as $row ) { - $resource_name = $row->getAssetGroupListingGroupFilter()->getResourceName(); - $operation = ( new AssetGroupListingGroupFilterOperation() )->setRemove( $resource_name ); - $operations[] = ( new MutateOperation() )->setAssetGroupListingGroupFilterOperation( $operation ); - } - - return $operations; - } - /** * Return a temporary resource name for the asset group. * @@ -439,10 +396,10 @@ protected function convert_asset_group( GoogleAdsRow $row ): array { * @throws Exception If the resource name is not in the expected format. */ protected function mutate( array $operations ): int { - $responses = $this->client->getGoogleAdsServiceClient()->mutate( - $this->options->get_ads_id(), - $operations - ); + $request = new MutateGoogleAdsRequest(); + $request->setCustomerId( $this->options->get_ads_id() ); + $request->setMutateOperations( $operations ); + $responses = $this->client->getGoogleAdsServiceClient()->mutate( $request ); foreach ( $responses->getMutateOperationResponses() as $response ) { if ( 'asset_group_result' === $response->getResponse() ) { diff --git a/src/API/Google/AdsAssetGroupAsset.php b/src/API/Google/AdsAssetGroupAsset.php index 307eaf37e0..0136c797de 100644 --- a/src/API/Google/AdsAssetGroupAsset.php +++ b/src/API/Google/AdsAssetGroupAsset.php @@ -7,13 +7,13 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Resources\AssetGroupAsset; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Resources\AssetGroupAsset; use Google\ApiCore\ApiException; use Automattic\WooCommerce\GoogleListingsAndAds\Exception\ExceptionWithResponseData; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; -use Google\Ads\GoogleAds\V14\Services\AssetGroupAssetOperation; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; +use Google\Ads\GoogleAds\V16\Services\AssetGroupAssetOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; @@ -22,7 +22,7 @@ * Class AdsAssetGroupAsset * * Use to get assets group assets for specific asset groups. - * https://developers.google.com/google-ads/api/fields/v14/asset_group_asset + * https://developers.google.com/google-ads/api/fields/V16/asset_group_asset * * @since 2.4.0 * diff --git a/src/API/Google/AdsCampaign.php b/src/API/Google/AdsCampaign.php index 9dc50141af..8f8f3c1f54 100644 --- a/src/API/Google/AdsCampaign.php +++ b/src/API/Google/AdsCampaign.php @@ -17,15 +17,16 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Options\TransientsInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WC; use Google\Ads\GoogleAds\Util\FieldMasks; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Common\MaximizeConversionValue; -use Google\Ads\GoogleAds\V14\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType; -use Google\Ads\GoogleAds\V14\Resources\Campaign; -use Google\Ads\GoogleAds\V14\Resources\Campaign\ShoppingSetting; -use Google\Ads\GoogleAds\V14\Services\CampaignServiceClient; -use Google\Ads\GoogleAds\V14\Services\CampaignOperation; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Common\MaximizeConversionValue; +use Google\Ads\GoogleAds\V16\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType; +use Google\Ads\GoogleAds\V16\Resources\Campaign; +use Google\Ads\GoogleAds\V16\Resources\Campaign\ShoppingSetting; +use Google\Ads\GoogleAds\V16\Services\Client\CampaignServiceClient; +use Google\Ads\GoogleAds\V16\Services\CampaignOperation; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\MutateGoogleAdsRequest; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; use Google\ApiCore\ApiException; use Google\ApiCore\ValidationException; use Exception; @@ -446,8 +447,8 @@ protected function create_operation( string $campaign_name, string $country ): M 'url_expansion_opt_out' => true, 'shopping_setting' => new ShoppingSetting( [ - 'merchant_id' => $this->options->get_merchant_id(), - 'sales_country' => $country, + 'merchant_id' => $this->options->get_merchant_id(), + 'feed_label' => $country, ] ), ] @@ -514,7 +515,7 @@ protected function convert_campaign( GoogleAdsRow $row ): array { $shopping = $campaign->getShoppingSetting(); if ( $shopping ) { $data += [ - 'country' => $shopping->getSalesCountry(), + 'country' => $shopping->getFeedLabel(), ]; } @@ -573,11 +574,10 @@ protected function combine_campaigns_and_campaign_criterion_results( array $camp * @throws ApiException If any of the operations fail. */ protected function mutate( array $operations ): int { - $responses = $this->client->getGoogleAdsServiceClient()->mutate( - $this->options->get_ads_id(), - $operations - ); - + $request = new MutateGoogleAdsRequest(); + $request->setCustomerId( $this->options->get_ads_id() ); + $request->setMutateOperations( $operations ); + $responses = $this->client->getGoogleAdsServiceClient()->mutate( $request ); foreach ( $responses->getMutateOperationResponses() as $response ) { if ( 'campaign_result' === $response->getResponse() ) { $campaign_result = $response->getCampaignResult(); diff --git a/src/API/Google/AdsCampaignBudget.php b/src/API/Google/AdsCampaignBudget.php index 49bb44c0ee..d6bfc0fb7b 100644 --- a/src/API/Google/AdsCampaignBudget.php +++ b/src/API/Google/AdsCampaignBudget.php @@ -9,11 +9,11 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; use Google\Ads\GoogleAds\Util\FieldMasks; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Resources\CampaignBudget; -use Google\Ads\GoogleAds\V14\Services\CampaignBudgetOperation; -use Google\Ads\GoogleAds\V14\Services\CampaignBudgetServiceClient; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Resources\CampaignBudget; +use Google\Ads\GoogleAds\V16\Services\CampaignBudgetOperation; +use Google\Ads\GoogleAds\V16\Services\Client\CampaignBudgetServiceClient; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; use Google\ApiCore\ValidationException; use Exception; diff --git a/src/API/Google/AdsCampaignCriterion.php b/src/API/Google/AdsCampaignCriterion.php index a89d6cb1a1..0cd93be9a8 100644 --- a/src/API/Google/AdsCampaignCriterion.php +++ b/src/API/Google/AdsCampaignCriterion.php @@ -3,12 +3,12 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Common\LocationInfo; -use Google\Ads\GoogleAds\V14\Enums\CampaignCriterionStatusEnum\CampaignCriterionStatus; -use Google\Ads\GoogleAds\V14\Resources\CampaignCriterion; -use Google\Ads\GoogleAds\V14\Services\CampaignCriterionOperation; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Common\LocationInfo; +use Google\Ads\GoogleAds\V16\Enums\CampaignCriterionStatusEnum\CampaignCriterionStatus; +use Google\Ads\GoogleAds\V16\Resources\CampaignCriterion; +use Google\Ads\GoogleAds\V16\Services\CampaignCriterionOperation; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; /** * Class AdsCampaignCriterion @@ -23,7 +23,7 @@ class AdsCampaignCriterion { * Returns a set of operations to create multiple campaign criteria. * * @param string $campaign_resource_name Campaign resource name. - * @param array $location_ids Targeted locations IDs. + * @param array $location_ids Targeted locations IDs. * * @return array */ @@ -40,7 +40,7 @@ function ( $location_id ) use ( $campaign_resource_name ) { * Returns a new campaign criterion create operation. * * @param string $campaign_resource_name Campaign resource name. - * @param int $location_id Targeted location ID. + * @param int $location_id Targeted location ID. * * @return MutateOperation */ diff --git a/src/API/Google/AdsConversionAction.php b/src/API/Google/AdsConversionAction.php index 6910b9d609..1f85957c13 100644 --- a/src/API/Google/AdsConversionAction.php +++ b/src/API/Google/AdsConversionAction.php @@ -8,18 +8,19 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; use Exception; -use Google\Ads\GoogleAds\V14\Common\TagSnippet; -use Google\Ads\GoogleAds\V14\Enums\ConversionActionCategoryEnum\ConversionActionCategory; -use Google\Ads\GoogleAds\V14\Enums\ConversionActionStatusEnum\ConversionActionStatus; -use Google\Ads\GoogleAds\V14\Enums\ConversionActionTypeEnum\ConversionActionType; -use Google\Ads\GoogleAds\V14\Enums\TrackingCodePageFormatEnum\TrackingCodePageFormat; -use Google\Ads\GoogleAds\V14\Enums\TrackingCodeTypeEnum\TrackingCodeType; -use Google\Ads\GoogleAds\V14\Resources\ConversionAction; -use Google\Ads\GoogleAds\V14\Resources\ConversionAction\ValueSettings; -use Google\Ads\GoogleAds\V14\Services\ConversionActionOperation; -use Google\Ads\GoogleAds\V14\Services\ConversionActionServiceClient; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Services\MutateConversionActionResult; +use Google\Ads\GoogleAds\V16\Common\TagSnippet; +use Google\Ads\GoogleAds\V16\Enums\ConversionActionCategoryEnum\ConversionActionCategory; +use Google\Ads\GoogleAds\V16\Enums\ConversionActionStatusEnum\ConversionActionStatus; +use Google\Ads\GoogleAds\V16\Enums\ConversionActionTypeEnum\ConversionActionType; +use Google\Ads\GoogleAds\V16\Enums\TrackingCodePageFormatEnum\TrackingCodePageFormat; +use Google\Ads\GoogleAds\V16\Enums\TrackingCodeTypeEnum\TrackingCodeType; +use Google\Ads\GoogleAds\V16\Resources\ConversionAction; +use Google\Ads\GoogleAds\V16\Resources\ConversionAction\ValueSettings; +use Google\Ads\GoogleAds\V16\Services\ConversionActionOperation; +use Google\Ads\GoogleAds\V16\Services\Client\ConversionActionServiceClient; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\MutateConversionActionResult; +use Google\Ads\GoogleAds\V16\Services\MutateConversionActionsRequest; use Google\ApiCore\ApiException; /** @@ -84,9 +85,11 @@ public function create_conversion_action(): array { ); // Create the conversion. + $request = new MutateConversionActionsRequest(); + $request->setCustomerId( $this->options->get_ads_id() ); + $request->setOperations( [ $conversion_action_operation ] ); $response = $this->client->getConversionActionServiceClient()->mutateConversionActions( - $this->options->get_ads_id(), - [ $conversion_action_operation ] + $request ); /** @var MutateConversionActionResult $added_conversion_action */ @@ -128,7 +131,7 @@ public function get_conversion_action( $resource_name ): array { try { // Accept IDs too if ( is_numeric( $resource_name ) ) { - $resource_name = ConversionActionServiceClient::conversionActionName( $this->options->get_ads_id(), $resource_name ); + $resource_name = ConversionActionServiceClient::conversionActionName( strval( $this->options->get_ads_id() ), strval( $resource_name ) ); } $results = ( new AdsConversionActionQuery() )->set_client( $this->client, $this->options->get_ads_id() ) diff --git a/src/API/Google/AdsReport.php b/src/API/Google/AdsReport.php index a9a3f8a31b..49a7f9769a 100644 --- a/src/API/Google/AdsReport.php +++ b/src/API/Google/AdsReport.php @@ -15,8 +15,8 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsAwareTrait; use DateTime; -use Google\Ads\GoogleAds\V14\Common\Segments; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Common\Segments; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; use Google\ApiCore\ApiException; /** diff --git a/src/API/Google/AssetFieldType.php b/src/API/Google/AssetFieldType.php index 4bd55657d6..18e7778134 100644 --- a/src/API/Google/AssetFieldType.php +++ b/src/API/Google/AssetFieldType.php @@ -3,14 +3,14 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\V14\Enums\AssetFieldTypeEnum\AssetFieldType as AdsAssetFieldType; +use Google\Ads\GoogleAds\V16\Enums\AssetFieldTypeEnum\AssetFieldType as AdsAssetFieldType; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\StatusMapping; use UnexpectedValueException; /** * Mapping between Google and internal AssetFieldTypes - * https://developers.google.com/google-ads/api/reference/rpc/v14/AssetFieldTypeEnum.AssetFieldType + * https://developers.google.com/google-ads/api/reference/rpc/V16/AssetFieldTypeEnum.AssetFieldType * * @since 2.4.0 * diff --git a/src/API/Google/BillingSetupStatus.php b/src/API/Google/BillingSetupStatus.php index b50105d05b..886059a85b 100644 --- a/src/API/Google/BillingSetupStatus.php +++ b/src/API/Google/BillingSetupStatus.php @@ -3,7 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\V14\Enums\BillingSetupStatusEnum\BillingSetupStatus as AdsBillingSetupStatus; +use Google\Ads\GoogleAds\V16\Enums\BillingSetupStatusEnum\BillingSetupStatus as AdsBillingSetupStatus; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\StatusMapping; /** diff --git a/src/API/Google/CallToActionType.php b/src/API/Google/CallToActionType.php index e6d65e6cf8..8a7bc15005 100644 --- a/src/API/Google/CallToActionType.php +++ b/src/API/Google/CallToActionType.php @@ -3,13 +3,13 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\V14\Enums\CallToActionTypeEnum\CallToActionType as AdsCallToActionType; +use Google\Ads\GoogleAds\V16\Enums\CallToActionTypeEnum\CallToActionType as AdsCallToActionType; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\StatusMapping; /** * Mapping between Google and internal CallToActionType - * https://developers.google.com/google-ads/api/reference/rpc/v14/CallToActionTypeEnum.CallToActionType + * https://developers.google.com/google-ads/api/reference/rpc/V16/CallToActionTypeEnum.CallToActionType * * @since 2.4.0 * diff --git a/src/API/Google/CampaignStatus.php b/src/API/Google/CampaignStatus.php index 4bf8e53699..7c8813b0f8 100644 --- a/src/API/Google/CampaignStatus.php +++ b/src/API/Google/CampaignStatus.php @@ -3,7 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\V14\Enums\CampaignStatusEnum\CampaignStatus as AdsCampaignStatus; +use Google\Ads\GoogleAds\V16\Enums\CampaignStatusEnum\CampaignStatus as AdsCampaignStatus; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\StatusMapping; /** diff --git a/src/API/Google/CampaignType.php b/src/API/Google/CampaignType.php index f68202db4a..d0d5f8a7f3 100644 --- a/src/API/Google/CampaignType.php +++ b/src/API/Google/CampaignType.php @@ -3,7 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google; -use Google\Ads\GoogleAds\V14\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType as AdsCampaignType; +use Google\Ads\GoogleAds\V16\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType as AdsCampaignType; use Automattic\WooCommerce\GoogleListingsAndAds\Internal\StatusMapping; /** diff --git a/src/API/Google/ExceptionTrait.php b/src/API/Google/ExceptionTrait.php index ce77bf921b..f0b5090e2f 100644 --- a/src/API/Google/ExceptionTrait.php +++ b/src/API/Google/ExceptionTrait.php @@ -54,7 +54,7 @@ protected function has_api_exception_error( ApiException $exception, string $err * The following are the example sources of ApiException, GoogleServiceException, * and other Exception in order: * - * @link https://github.com/googleads/google-ads-php/blob/v19.2.0/src/Google/Ads/GoogleAds/V14/Services/Gapic/CustomerServiceGapicClient.php#L391 + * @link https://github.com/googleads/google-ads-php/blob/v19.2.0/src/Google/Ads/GoogleAds/V16/Services/Gapic/CustomerServiceGapicClient.php#L391 * @link https://github.com/googleapis/google-api-php-client/blob/v2.15.0/src/Http/REST.php#L119-L135 * @link https://github.com/googleapis/google-api-php-client/blob/v2.15.0/src/Service/Resource.php#L86-L175 * diff --git a/src/API/Google/MerchantMetrics.php b/src/API/Google/MerchantMetrics.php index 2e18651deb..ca7ca7ae4c 100644 --- a/src/API/Google/MerchantMetrics.php +++ b/src/API/Google/MerchantMetrics.php @@ -15,7 +15,7 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Google\Service\ShoppingContent\SearchResponse; use DateTime; use Exception; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; use Google\ApiCore\PagedListResponse; /** diff --git a/src/API/Google/Query/AdsCampaignQuery.php b/src/API/Google/Query/AdsCampaignQuery.php index e4d0b8e3aa..658960a327 100644 --- a/src/API/Google/Query/AdsCampaignQuery.php +++ b/src/API/Google/Query/AdsCampaignQuery.php @@ -23,7 +23,7 @@ public function __construct() { 'campaign.name', 'campaign.status', 'campaign.advertising_channel_type', - 'campaign.shopping_setting.sales_country', + 'campaign.shopping_setting.feed_label', 'campaign_budget.amount_micros', ] ); diff --git a/src/API/Google/Query/AdsProductLinkInvitationQuery.php b/src/API/Google/Query/AdsProductLinkInvitationQuery.php new file mode 100644 index 0000000000..27fb283909 --- /dev/null +++ b/src/API/Google/Query/AdsProductLinkInvitationQuery.php @@ -0,0 +1,22 @@ +columns( [ 'product_link_invitation.merchant_center.merchant_center_id', 'product_link_invitation.status' ] ); + } +} diff --git a/src/API/Google/Query/AdsQuery.php b/src/API/Google/Query/AdsQuery.php index 0185915aba..b957816f95 100644 --- a/src/API/Google/Query/AdsQuery.php +++ b/src/API/Google/Query/AdsQuery.php @@ -5,7 +5,8 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Exception\InvalidProperty; use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\SearchGoogleAdsRequest; use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; @@ -89,11 +90,9 @@ protected function query_results() { throw InvalidProperty::not_null( get_class( $this ), 'client' ); } - /** @var PagedListResponse $this->results */ - $this->results = $this->client->getGoogleAdsServiceClient()->search( - $this->id, - $this->build_query(), - $this->search_args - ); + $request = new SearchGoogleAdsRequest(); + $request->setQuery( $this->build_query() ); + $request->setCustomerId( $this->id ); + $this->results = $this->client->getGoogleAdsServiceClient()->search( $request ); } } diff --git a/src/API/Google/Query/AdsReportQuery.php b/src/API/Google/Query/AdsReportQuery.php index eac9ae8683..a74648679b 100644 --- a/src/API/Google/Query/AdsReportQuery.php +++ b/src/API/Google/Query/AdsReportQuery.php @@ -3,7 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query; -use Google\Ads\GoogleAds\V14\Resources\ShoppingPerformanceView; +use Google\Ads\GoogleAds\V16\Resources\ShoppingPerformanceView; defined( 'ABSPATH' ) || exit; diff --git a/src/API/Site/Controllers/Ads/AssetGroupController.php b/src/API/Site/Controllers/Ads/AssetGroupController.php index 3dcafe9b65..703d92724d 100644 --- a/src/API/Site/Controllers/Ads/AssetGroupController.php +++ b/src/API/Site/Controllers/Ads/AssetGroupController.php @@ -15,7 +15,7 @@ /** * Class for handling API requests related to the asset groups. - * See https://developers.google.com/google-ads/api/reference/rpc/v14/AssetGroup + * See https://developers.google.com/google-ads/api/reference/rpc/V16/AssetGroup * * @package Automattic\WooCommerce\GoogleListingsAndAds\API\Site\Controllers\Ads */ diff --git a/src/Google/Ads/GoogleAdsClient.php b/src/Google/Ads/GoogleAdsClient.php index 1972044347..485e70503a 100644 --- a/src/Google/Ads/GoogleAdsClient.php +++ b/src/Google/Ads/GoogleAdsClient.php @@ -2,7 +2,7 @@ declare( strict_types=1 ); /** - * Overrides vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V14/GoogleAdsClient.php + * Overrides vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V16/GoogleAdsClient.php * * phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid * phpcs:disable WordPress.NamingConventions.ValidVariableName diff --git a/src/Google/Ads/ServiceClientFactoryTrait.php b/src/Google/Ads/ServiceClientFactoryTrait.php index 82931a3216..e3bdc89f5b 100644 --- a/src/Google/Ads/ServiceClientFactoryTrait.php +++ b/src/Google/Ads/ServiceClientFactoryTrait.php @@ -2,7 +2,7 @@ declare( strict_types=1 ); /** - * Overrides vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V14/ServiceClientFactoryTrait.php + * Overrides vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V16/ServiceClientFactoryTrait.php * * phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid * phpcs:disable WordPress.NamingConventions.ValidVariableName @@ -13,25 +13,24 @@ use Google\Ads\GoogleAds\Constants; use Google\Ads\GoogleAds\Lib\ConfigurationTrait; -use Google\Ads\GoogleAds\V14\Services\AccountBudgetServiceClient; -use Google\Ads\GoogleAds\V14\Services\AccountLinkServiceClient; -use Google\Ads\GoogleAds\V14\Services\AdGroupAdLabelServiceClient; -use Google\Ads\GoogleAds\V14\Services\AdGroupAdServiceClient; -use Google\Ads\GoogleAds\V14\Services\AdGroupCriterionServiceClient; -use Google\Ads\GoogleAds\V14\Services\AdGroupServiceClient; -use Google\Ads\GoogleAds\V14\Services\AdServiceClient; -use Google\Ads\GoogleAds\V14\Services\AssetGroupListingGroupFilterServiceClient; -use Google\Ads\GoogleAds\V14\Services\AssetGroupServiceClient; -use Google\Ads\GoogleAds\V14\Services\BillingSetupServiceClient; -use Google\Ads\GoogleAds\V14\Services\CampaignBudgetServiceClient; -use Google\Ads\GoogleAds\V14\Services\CampaignCriterionServiceClient; -use Google\Ads\GoogleAds\V14\Services\CampaignServiceClient; -use Google\Ads\GoogleAds\V14\Services\ConversionActionServiceClient; -use Google\Ads\GoogleAds\V14\Services\CustomerServiceClient; -use Google\Ads\GoogleAds\V14\Services\CustomerUserAccessServiceClient; -use Google\Ads\GoogleAds\V14\Services\GeoTargetConstantServiceClient; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsServiceClient; -use Google\Ads\GoogleAds\V14\Services\MerchantCenterLinkServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AccountLinkServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AdGroupAdLabelServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AdGroupAdServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AdGroupCriterionServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AdGroupServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AdServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AssetGroupListingGroupFilterServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\AssetGroupServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\BillingSetupServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CampaignBudgetServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CampaignCriterionServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CampaignServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\ConversionActionServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CustomerServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CustomerUserAccessServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\GeoTargetConstantServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\GoogleAdsServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\ProductLinkInvitationServiceClient; /** * Contains service client factory methods. @@ -76,12 +75,6 @@ public function getGoogleAdsClientOptions(): array { return $clientOptions; } - /** - * @return AccountBudgetServiceClient - */ - public function getAccountBudgetServiceClient(): AccountBudgetServiceClient { - return new AccountBudgetServiceClient( $this->getGoogleAdsClientOptions() ); - } /** * @return AccountLinkServiceClient @@ -203,9 +196,9 @@ public function getGoogleAdsServiceClient(): GoogleAdsServiceClient { } /** - * @return MerchantCenterLinkServiceClient + * @return ProductLinkInvitationServiceClient */ - public function getMerchantCenterLinkServiceClient(): MerchantCenterLinkServiceClient { - return new MerchantCenterLinkServiceClient( $this->getGoogleAdsClientOptions() ); + public function getProductLinkInvitationServiceClient(): ProductLinkInvitationServiceClient { + return new ProductLinkInvitationServiceClient( $this->getGoogleAdsClientOptions() ); } } diff --git a/src/Hooks/README.md b/src/Hooks/README.md index f4151fed0b..0813b6044b 100644 --- a/src/Hooks/README.md +++ b/src/Hooks/README.md @@ -8,7 +8,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [BulkEditInitializer.php#L36](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/BulkEdit/BulkEditInitializer.php#L36) +- [BulkEditInitializer.php#L36](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/BulkEdit/BulkEditInitializer.php#L36) ## woocommerce_admin_disabled @@ -16,7 +16,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCAdminValidator.php#L38](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Internal/Requirements/WCAdminValidator.php#L38) +- [WCAdminValidator.php#L38](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Internal/Requirements/WCAdminValidator.php#L38) ## woocommerce_gla_ads_billing_setup_status @@ -24,8 +24,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Ads.php#L112](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L112) -- [Ads.php#L121](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L121) +- [Ads.php#L113](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L113) +- [Ads.php#L122](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L122) ## woocommerce_gla_ads_client_exception @@ -33,24 +33,24 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AdsReport.php#L105](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsReport.php#L105) -- [AdsConversionAction.php#L97](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsConversionAction.php#L97) -- [AdsConversionAction.php#L143](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsConversionAction.php#L143) -- [AdsAssetGroupAsset.php#L135](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsAssetGroupAsset.php#L135) -- [AdsAssetGroupAsset.php#L201](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsAssetGroupAsset.php#L201) -- [Ads.php#L73](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L73) -- [Ads.php#L117](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L117) -- [Ads.php#L172](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L172) -- [Ads.php#L214](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L214) -- [Ads.php#L298](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Ads.php#L298) -- [AdsCampaign.php#L140](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsCampaign.php#L140) -- [AdsCampaign.php#L183](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsCampaign.php#L183) -- [AdsCampaign.php#L246](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsCampaign.php#L246) -- [AdsCampaign.php#L301](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsCampaign.php#L301) -- [AdsCampaign.php#L338](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsCampaign.php#L338) -- [AdsAssetGroup.php#L113](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsAssetGroup.php#L113) -- [AdsAssetGroup.php#L304](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsAssetGroup.php#L304) -- [AdsAssetGroup.php#L368](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsAssetGroup.php#L368) +- [AdsReport.php#L105](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsReport.php#L105) +- [AdsConversionAction.php#L100](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsConversionAction.php#L100) +- [AdsConversionAction.php#L146](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsConversionAction.php#L146) +- [AdsAssetGroupAsset.php#L135](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsAssetGroupAsset.php#L135) +- [AdsAssetGroupAsset.php#L201](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsAssetGroupAsset.php#L201) +- [Ads.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L74) +- [Ads.php#L118](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L118) +- [Ads.php#L167](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L167) +- [Ads.php#L209](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L209) +- [Ads.php#L293](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Ads.php#L293) +- [AdsCampaign.php#L141](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsCampaign.php#L141) +- [AdsCampaign.php#L184](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsCampaign.php#L184) +- [AdsCampaign.php#L247](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsCampaign.php#L247) +- [AdsCampaign.php#L302](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsCampaign.php#L302) +- [AdsCampaign.php#L339](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsCampaign.php#L339) +- [AdsAssetGroup.php#L113](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsAssetGroup.php#L113) +- [AdsAssetGroup.php#L261](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsAssetGroup.php#L261) +- [AdsAssetGroup.php#L325](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsAssetGroup.php#L325) ## woocommerce_gla_ads_setup_completed @@ -58,7 +58,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SetupCompleteController.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/Ads/SetupCompleteController.php#L66) +- [SetupCompleteController.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/Ads/SetupCompleteController.php#L66) ## woocommerce_gla_attribute_applicable_product_types_ @@ -66,8 +66,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributeManager.php#L295](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/Attributes/AttributeManager.php#L295) -- [AttributesForm.php#L98](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Product/Attributes/AttributesForm.php#L98) +- [AttributeManager.php#L295](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/Attributes/AttributeManager.php#L295) +- [AttributesForm.php#L98](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Product/Attributes/AttributesForm.php#L98) ## woocommerce_gla_attribute_hidden_product_types_ @@ -75,7 +75,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributesForm.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Product/Attributes/AttributesForm.php#L103) +- [AttributesForm.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Product/Attributes/AttributesForm.php#L103) ## woocommerce_gla_attribute_mapping_sources @@ -83,7 +83,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IsFieldTrait.php#L31](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L31) +- [IsFieldTrait.php#L31](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L31) ## woocommerce_gla_attribute_mapping_sources_custom_attributes @@ -91,7 +91,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IsFieldTrait.php#L125](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L125) +- [IsFieldTrait.php#L125](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L125) ## woocommerce_gla_attribute_mapping_sources_global_attributes @@ -99,7 +99,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IsFieldTrait.php#L64](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L64) +- [IsFieldTrait.php#L64](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L64) ## woocommerce_gla_attribute_mapping_sources_product_fields @@ -107,7 +107,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IsFieldTrait.php#L115](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L115) +- [IsFieldTrait.php#L115](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L115) ## woocommerce_gla_attribute_mapping_sources_taxonomies @@ -115,7 +115,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IsFieldTrait.php#L65](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L65) +- [IsFieldTrait.php#L65](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/AttributeMapping/Traits/IsFieldTrait.php#L65) ## woocommerce_gla_attributes_tab_applicable_product_types @@ -123,7 +123,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributesTrait.php#L18](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Product/Attributes/AttributesTrait.php#L18) +- [AttributesTrait.php#L18](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Product/Attributes/AttributesTrait.php#L18) ## woocommerce_gla_batch_deleted_products @@ -131,7 +131,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L229](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L229) +- [ProductSyncer.php#L229](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L229) ## woocommerce_gla_batch_retry_delete_products @@ -139,7 +139,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L343](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L343) +- [ProductSyncer.php#L343](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L343) ## woocommerce_gla_batch_retry_update_products @@ -147,7 +147,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L287](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L287) +- [ProductSyncer.php#L287](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L287) ## woocommerce_gla_batch_updated_products @@ -155,7 +155,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L143](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L143) +- [ProductSyncer.php#L143](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L143) ## woocommerce_gla_batched_job_size @@ -163,8 +163,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AbstractBatchedActionSchedulerJob.php#L104](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/AbstractBatchedActionSchedulerJob.php#L104) -- [UpdateSyncableProductsCount.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/UpdateSyncableProductsCount.php#L74) +- [AbstractBatchedActionSchedulerJob.php#L104](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/AbstractBatchedActionSchedulerJob.php#L104) +- [UpdateSyncableProductsCount.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/UpdateSyncableProductsCount.php#L74) ## woocommerce_gla_bulk_update_coupon @@ -172,7 +172,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponBulkEdit.php#L133](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/BulkEdit/CouponBulkEdit.php#L133) +- [CouponBulkEdit.php#L133](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/BulkEdit/CouponBulkEdit.php#L133) ## woocommerce_gla_conversion_action_name @@ -180,7 +180,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AdsConversionAction.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/AdsConversionAction.php#L66) +- [AdsConversionAction.php#L67](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/AdsConversionAction.php#L67) ## woocommerce_gla_coupon_destinations @@ -188,7 +188,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCCouponAdapter.php#L391](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/WCCouponAdapter.php#L391) +- [WCCouponAdapter.php#L391](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/WCCouponAdapter.php#L391) ## woocommerce_gla_coupons_delete_retry_on_failure @@ -196,7 +196,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L438](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L438) +- [CouponSyncer.php#L438](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L438) ## woocommerce_gla_coupons_update_retry_on_failure @@ -204,7 +204,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L400](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L400) +- [CouponSyncer.php#L400](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L400) ## woocommerce_gla_custom_merchant_issues @@ -212,7 +212,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantStatuses.php#L538](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L538) +- [MerchantStatuses.php#L538](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L538) ## woocommerce_gla_debug_message @@ -220,39 +220,39 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L149](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L149) -- [ProductSyncer.php#L159](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L159) -- [ProductSyncer.php#L235](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L235) -- [ProductSyncer.php#L245](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L245) -- [BatchProductHelper.php#L208](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/BatchProductHelper.php#L208) -- [BatchProductHelper.php#L231](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/BatchProductHelper.php#L231) -- [SyncerHooks.php#L197](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/SyncerHooks.php#L197) -- [ProductRepository.php#L315](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductRepository.php#L315) -- [WCProductAdapter.php#L205](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L205) -- [ProductHelper.php#L483](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L483) -- [ProductHelper.php#L516](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L516) -- [CleanupSyncedProducts.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/CleanupSyncedProducts.php#L74) -- [ActionSchedulerJobMonitor.php#L117](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/ActionSchedulerJobMonitor.php#L117) -- [ActionSchedulerJobMonitor.php#L126](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/ActionSchedulerJobMonitor.php#L126) -- [SyncerHooks.php#L178](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/SyncerHooks.php#L178) -- [CouponHelper.php#L257](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponHelper.php#L257) -- [CouponHelper.php#L294](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponHelper.php#L294) -- [CouponSyncer.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L103) -- [CouponSyncer.php#L116](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L116) -- [CouponSyncer.php#L141](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L141) -- [CouponSyncer.php#L155](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L155) -- [CouponSyncer.php#L172](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L172) -- [CouponSyncer.php#L195](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L195) -- [CouponSyncer.php#L260](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L260) -- [CouponSyncer.php#L309](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L309) -- [CouponSyncer.php#L328](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L328) -- [IssuesController.php#L95](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/IssuesController.php#L95) -- [ProductMetaQueryHelper.php#L109](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/DB/ProductMetaQueryHelper.php#L109) -- [ProductMetaQueryHelper.php#L140](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/DB/ProductMetaQueryHelper.php#L140) -- [MerchantCenterService.php#L305](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantCenterService.php#L305) -- [MerchantStatuses.php#L413](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L413) -- [MerchantStatuses.php#L667](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L667) -- [MerchantStatuses.php#L916](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L916) +- [ProductSyncer.php#L149](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L149) +- [ProductSyncer.php#L159](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L159) +- [ProductSyncer.php#L235](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L235) +- [ProductSyncer.php#L245](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L245) +- [BatchProductHelper.php#L208](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/BatchProductHelper.php#L208) +- [BatchProductHelper.php#L231](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/BatchProductHelper.php#L231) +- [SyncerHooks.php#L197](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/SyncerHooks.php#L197) +- [ProductRepository.php#L315](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductRepository.php#L315) +- [WCProductAdapter.php#L205](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L205) +- [ProductHelper.php#L483](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L483) +- [ProductHelper.php#L516](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L516) +- [CleanupSyncedProducts.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/CleanupSyncedProducts.php#L74) +- [ActionSchedulerJobMonitor.php#L117](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/ActionSchedulerJobMonitor.php#L117) +- [ActionSchedulerJobMonitor.php#L126](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/ActionSchedulerJobMonitor.php#L126) +- [SyncerHooks.php#L178](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/SyncerHooks.php#L178) +- [CouponHelper.php#L257](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponHelper.php#L257) +- [CouponHelper.php#L294](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponHelper.php#L294) +- [CouponSyncer.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L103) +- [CouponSyncer.php#L116](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L116) +- [CouponSyncer.php#L141](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L141) +- [CouponSyncer.php#L155](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L155) +- [CouponSyncer.php#L172](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L172) +- [CouponSyncer.php#L195](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L195) +- [CouponSyncer.php#L260](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L260) +- [CouponSyncer.php#L309](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L309) +- [CouponSyncer.php#L328](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L328) +- [IssuesController.php#L95](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/IssuesController.php#L95) +- [ProductMetaQueryHelper.php#L109](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/DB/ProductMetaQueryHelper.php#L109) +- [ProductMetaQueryHelper.php#L140](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/DB/ProductMetaQueryHelper.php#L140) +- [MerchantCenterService.php#L305](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantCenterService.php#L305) +- [MerchantStatuses.php#L413](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L413) +- [MerchantStatuses.php#L667](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L667) +- [MerchantStatuses.php#L916](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L916) ## woocommerce_gla_deleted_promotions @@ -260,7 +260,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L322](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L322) +- [CouponSyncer.php#L322](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L322) ## woocommerce_gla_dimension_unit @@ -268,7 +268,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L431](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L431) +- [WCProductAdapter.php#L431](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L431) ## woocommerce_gla_disable_gtag_tracking @@ -276,7 +276,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [GlobalSiteTag.php#L526](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Google/GlobalSiteTag.php#L526) +- [GlobalSiteTag.php#L526](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Google/GlobalSiteTag.php#L526) ## woocommerce_gla_enable_connection_test @@ -284,7 +284,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ConnectionTest.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/ConnectionTest.php#L87) +- [ConnectionTest.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/ConnectionTest.php#L87) ## woocommerce_gla_enable_debug_logging @@ -292,7 +292,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [DebugLogger.php#L33](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Logging/DebugLogger.php#L33) +- [DebugLogger.php#L33](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Logging/DebugLogger.php#L33) ## woocommerce_gla_enable_mcm @@ -300,7 +300,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [GLAChannel.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MultichannelMarketing/GLAChannel.php#L75) +- [GLAChannel.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MultichannelMarketing/GLAChannel.php#L75) ## woocommerce_gla_enable_reports @@ -308,7 +308,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Admin.php#L271](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Admin.php#L271) +- [Admin.php#L271](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Admin.php#L271) ## woocommerce_gla_error @@ -316,23 +316,23 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L290](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L290) -- [ProductSyncer.php#L313](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L313) -- [ProductSyncer.php#L346](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L346) -- [ProductSyncer.php#L361](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L361) -- [BatchProductHelper.php#L248](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/BatchProductHelper.php#L248) -- [ProductMetaHandler.php#L173](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductMetaHandler.php#L173) -- [AttributeManager.php#L269](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/Attributes/AttributeManager.php#L269) -- [ProductHelper.php#L375](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L375) -- [ProductHelper.php#L592](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L592) -- [CouponMetaHandler.php#L220](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponMetaHandler.php#L220) -- [CouponSyncer.php#L410](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L410) -- [CouponSyncer.php#L448](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L448) -- [CouponSyncer.php#L466](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L466) -- [ProductMetaQueryHelper.php#L156](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/DB/ProductMetaQueryHelper.php#L156) -- [PHPView.php#L136](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/View/PHPView.php#L136) -- [PHPView.php#L164](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/View/PHPView.php#L164) -- [PHPView.php#L208](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/View/PHPView.php#L208) +- [ProductSyncer.php#L290](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L290) +- [ProductSyncer.php#L313](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L313) +- [ProductSyncer.php#L346](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L346) +- [ProductSyncer.php#L361](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L361) +- [BatchProductHelper.php#L248](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/BatchProductHelper.php#L248) +- [ProductMetaHandler.php#L173](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductMetaHandler.php#L173) +- [AttributeManager.php#L269](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/Attributes/AttributeManager.php#L269) +- [ProductHelper.php#L375](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L375) +- [ProductHelper.php#L592](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L592) +- [CouponMetaHandler.php#L220](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponMetaHandler.php#L220) +- [CouponSyncer.php#L410](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L410) +- [CouponSyncer.php#L448](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L448) +- [CouponSyncer.php#L466](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L466) +- [ProductMetaQueryHelper.php#L156](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/DB/ProductMetaQueryHelper.php#L156) +- [PHPView.php#L136](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/View/PHPView.php#L136) +- [PHPView.php#L164](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/View/PHPView.php#L164) +- [PHPView.php#L208](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/View/PHPView.php#L208) ## woocommerce_gla_exception @@ -340,30 +340,30 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ScriptWithBuiltDependenciesAsset.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Assets/ScriptWithBuiltDependenciesAsset.php#L66) -- [ProductSyncer.php#L134](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L134) -- [ProductSyncer.php#L220](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L220) -- [ProductHelper.php#L257](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L257) -- [PluginUpdate.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/Update/PluginUpdate.php#L75) -- [CouponSyncer.php#L203](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L203) -- [CouponSyncer.php#L293](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L293) -- [ContactInformationController.php#L242](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/ContactInformationController.php#L242) -- [SettingsSyncController.php#L96](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L96) -- [ProductVisibilityController.php#L193](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/ProductVisibilityController.php#L193) -- [Connection.php#L95](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L95) -- [Middleware.php#L455](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L455) -- [DateTime.php#L44](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Input/DateTime.php#L44) -- [DateTime.php#L80](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Input/DateTime.php#L80) -- [CouponChannelVisibilityMetaBox.php#L197](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/MetaBox/CouponChannelVisibilityMetaBox.php#L197) -- [ChannelVisibilityMetaBox.php#L176](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/MetaBox/ChannelVisibilityMetaBox.php#L176) -- [PHPView.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/View/PHPView.php#L87) -- [WooCommercePreOrders.php#L111](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Integration/WooCommercePreOrders.php#L111) -- [WooCommercePreOrders.php#L131](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Integration/WooCommercePreOrders.php#L131) -- [GoogleServiceProvider.php#L234](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Internal/DependencyManagement/GoogleServiceProvider.php#L234) -- [GoogleServiceProvider.php#L244](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Internal/DependencyManagement/GoogleServiceProvider.php#L244) -- [ClearProductStatsCache.php#L61](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Event/ClearProductStatsCache.php#L61) -- [NoteInitializer.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Notes/NoteInitializer.php#L74) -- [NoteInitializer.php#L116](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Notes/NoteInitializer.php#L116) +- [ScriptWithBuiltDependenciesAsset.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Assets/ScriptWithBuiltDependenciesAsset.php#L66) +- [ProductSyncer.php#L134](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L134) +- [ProductSyncer.php#L220](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L220) +- [ProductHelper.php#L257](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L257) +- [PluginUpdate.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/Update/PluginUpdate.php#L75) +- [CouponSyncer.php#L203](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L203) +- [CouponSyncer.php#L293](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L293) +- [ContactInformationController.php#L242](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/ContactInformationController.php#L242) +- [SettingsSyncController.php#L96](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L96) +- [ProductVisibilityController.php#L193](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/ProductVisibilityController.php#L193) +- [Connection.php#L95](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L95) +- [Middleware.php#L455](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L455) +- [DateTime.php#L44](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Input/DateTime.php#L44) +- [DateTime.php#L80](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Input/DateTime.php#L80) +- [CouponChannelVisibilityMetaBox.php#L197](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/MetaBox/CouponChannelVisibilityMetaBox.php#L197) +- [ChannelVisibilityMetaBox.php#L176](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/MetaBox/ChannelVisibilityMetaBox.php#L176) +- [PHPView.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/View/PHPView.php#L87) +- [WooCommercePreOrders.php#L111](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Integration/WooCommercePreOrders.php#L111) +- [WooCommercePreOrders.php#L131](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Integration/WooCommercePreOrders.php#L131) +- [GoogleServiceProvider.php#L234](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Internal/DependencyManagement/GoogleServiceProvider.php#L234) +- [GoogleServiceProvider.php#L244](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Internal/DependencyManagement/GoogleServiceProvider.php#L244) +- [ClearProductStatsCache.php#L61](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Event/ClearProductStatsCache.php#L61) +- [NoteInitializer.php#L74](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Notes/NoteInitializer.php#L74) +- [NoteInitializer.php#L116](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Notes/NoteInitializer.php#L116) ## woocommerce_gla_force_run_install @@ -371,7 +371,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Installer.php#L82](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Installer.php#L82) +- [Installer.php#L82](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Installer.php#L82) ## woocommerce_gla_get_google_product_offer_id @@ -379,7 +379,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L284](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L284) +- [WCProductAdapter.php#L284](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L284) ## woocommerce_gla_get_sync_ready_products_filter @@ -387,7 +387,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductFilter.php#L61](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductFilter.php#L61) +- [ProductFilter.php#L61](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductFilter.php#L61) ## woocommerce_gla_get_sync_ready_products_pre_filter @@ -395,7 +395,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductFilter.php#L47](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductFilter.php#L47) +- [ProductFilter.php#L47](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductFilter.php#L47) ## woocommerce_gla_get_wc_product_id @@ -403,7 +403,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductHelper.php#L302](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L302) +- [ProductHelper.php#L302](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L302) ## woocommerce_gla_gtag_consent @@ -411,7 +411,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [GlobalSiteTag.php#L302](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Google/GlobalSiteTag.php#L302) +- [GlobalSiteTag.php#L302](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Google/GlobalSiteTag.php#L302) ## woocommerce_gla_guzzle_client_exception @@ -419,20 +419,20 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Connection.php#L70](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L70) -- [Connection.php#L91](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L91) -- [Connection.php#L126](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L126) -- [Middleware.php#L80](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L80) -- [Middleware.php#L178](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L178) -- [Middleware.php#L228](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L228) -- [Middleware.php#L273](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L273) -- [Middleware.php#L344](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L344) -- [Middleware.php#L394](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L394) -- [Middleware.php#L418](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L418) -- [Middleware.php#L452](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L452) -- [Middleware.php#L554](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L554) -- [Middleware.php#L614](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L614) -- [GoogleServiceProvider.php#L263](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Internal/DependencyManagement/GoogleServiceProvider.php#L263) +- [Connection.php#L70](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L70) +- [Connection.php#L91](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L91) +- [Connection.php#L126](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L126) +- [Middleware.php#L80](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L80) +- [Middleware.php#L178](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L178) +- [Middleware.php#L228](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L228) +- [Middleware.php#L273](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L273) +- [Middleware.php#L344](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L344) +- [Middleware.php#L394](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L394) +- [Middleware.php#L418](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L418) +- [Middleware.php#L452](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L452) +- [Middleware.php#L554](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L554) +- [Middleware.php#L614](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L614) +- [GoogleServiceProvider.php#L263](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Internal/DependencyManagement/GoogleServiceProvider.php#L263) ## woocommerce_gla_guzzle_invalid_response @@ -440,15 +440,15 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Connection.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L66) -- [Connection.php#L121](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Connection.php#L121) -- [Middleware.php#L159](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L159) -- [Middleware.php#L223](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L223) -- [Middleware.php#L267](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L267) -- [Middleware.php#L339](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L339) -- [Middleware.php#L389](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L389) -- [Middleware.php#L550](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L550) -- [Middleware.php#L602](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L602) +- [Connection.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L66) +- [Connection.php#L121](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Connection.php#L121) +- [Middleware.php#L159](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L159) +- [Middleware.php#L223](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L223) +- [Middleware.php#L267](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L267) +- [Middleware.php#L339](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L339) +- [Middleware.php#L389](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L389) +- [Middleware.php#L550](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L550) +- [Middleware.php#L602](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L602) ## woocommerce_gla_handle_shipping_method_to_rates @@ -456,7 +456,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ZoneMethodsParser.php#L106](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Shipping/ZoneMethodsParser.php#L106) +- [ZoneMethodsParser.php#L106](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Shipping/ZoneMethodsParser.php#L106) ## woocommerce_gla_hidden_coupon_types @@ -464,7 +464,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L379](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L379) +- [CouponSyncer.php#L379](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L379) ## woocommerce_gla_job_failure_rate_threshold @@ -472,7 +472,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ActionSchedulerJobMonitor.php#L186](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/ActionSchedulerJobMonitor.php#L186) +- [ActionSchedulerJobMonitor.php#L186](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/ActionSchedulerJobMonitor.php#L186) ## woocommerce_gla_job_failure_timeframe @@ -480,7 +480,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ActionSchedulerJobMonitor.php#L195](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Jobs/ActionSchedulerJobMonitor.php#L195) +- [ActionSchedulerJobMonitor.php#L195](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Jobs/ActionSchedulerJobMonitor.php#L195) ## woocommerce_gla_mapping_rules_change @@ -488,9 +488,9 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributeMappingRulesController.php#L143](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L143) -- [AttributeMappingRulesController.php#L166](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L166) -- [AttributeMappingRulesController.php#L188](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L188) +- [AttributeMappingRulesController.php#L143](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L143) +- [AttributeMappingRulesController.php#L166](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L166) +- [AttributeMappingRulesController.php#L188](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/AttributeMapping/AttributeMappingRulesController.php#L188) ## woocommerce_gla_mc_account_review_lifetime @@ -498,7 +498,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [RequestReviewStatuses.php#L156](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Google/RequestReviewStatuses.php#L156) +- [RequestReviewStatuses.php#L156](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Google/RequestReviewStatuses.php#L156) ## woocommerce_gla_mc_client_exception @@ -506,15 +506,15 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantReport.php#L115](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/MerchantReport.php#L115) -- [MerchantReport.php#L183](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/MerchantReport.php#L183) -- [Merchant.php#L92](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L92) -- [Merchant.php#L140](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L140) -- [Merchant.php#L172](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L172) -- [Merchant.php#L191](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L191) -- [Merchant.php#L247](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L247) -- [Merchant.php#L292](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L292) -- [Merchant.php#L354](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L354) +- [MerchantReport.php#L115](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/MerchantReport.php#L115) +- [MerchantReport.php#L183](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/MerchantReport.php#L183) +- [Merchant.php#L92](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L92) +- [Merchant.php#L140](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L140) +- [Merchant.php#L172](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L172) +- [Merchant.php#L191](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L191) +- [Merchant.php#L247](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L247) +- [Merchant.php#L292](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L292) +- [Merchant.php#L354](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L354) ## woocommerce_gla_mc_settings_sync @@ -522,7 +522,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SettingsSyncController.php#L69](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L69) +- [SettingsSyncController.php#L69](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L69) ## woocommerce_gla_mc_status_lifetime @@ -530,7 +530,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantStatuses.php#L935](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L935) +- [MerchantStatuses.php#L935](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L935) ## woocommerce_gla_merchant_issue_override @@ -538,7 +538,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [IssuesController.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/IssuesController.php#L85) +- [IssuesController.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/IssuesController.php#L85) ## woocommerce_gla_merchant_status_presync_issues_chunk @@ -546,7 +546,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantStatuses.php#L596](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantStatuses.php#L596) +- [MerchantStatuses.php#L596](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantStatuses.php#L596) ## woocommerce_gla_options_deleted_ @@ -554,7 +554,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Options.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Options/Options.php#L103) +- [Options.php#L103](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Options/Options.php#L103) ## woocommerce_gla_options_updated_ @@ -562,8 +562,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Options.php#L65](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Options/Options.php#L65) -- [Options.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Options/Options.php#L85) +- [Options.php#L65](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Options/Options.php#L65) +- [Options.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Options/Options.php#L85) ## woocommerce_gla_prepared_response_->GET_ROUTE_NAME @@ -571,7 +571,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [BaseController.php#L160](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/BaseController.php#L160) +- [BaseController.php#L160](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/BaseController.php#L160) ## woocommerce_gla_product_attribute_types @@ -579,7 +579,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributeManager.php#L243](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/Attributes/AttributeManager.php#L243) +- [AttributeManager.php#L243](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/Attributes/AttributeManager.php#L243) ## woocommerce_gla_product_attribute_value_ @@ -587,8 +587,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L910](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L910) -- [WCProductAdapter.php#L961](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L961) +- [WCProductAdapter.php#L916](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L916) +- [WCProductAdapter.php#L967](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L967) ## woocommerce_gla_product_attribute_value_description @@ -596,7 +596,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L352](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L352) +- [WCProductAdapter.php#L352](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L352) ## woocommerce_gla_product_attribute_value_options_::get_id @@ -604,7 +604,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AttributesForm.php#L127](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Admin/Product/Attributes/AttributesForm.php#L127) +- [AttributesForm.php#L127](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Admin/Product/Attributes/AttributesForm.php#L127) ## woocommerce_gla_product_attribute_value_price @@ -612,7 +612,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L634](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L634) +- [WCProductAdapter.php#L640](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L640) ## woocommerce_gla_product_attribute_value_sale_price @@ -620,7 +620,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L686](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L686) +- [WCProductAdapter.php#L692](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L692) ## woocommerce_gla_product_attribute_values @@ -628,7 +628,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L166](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L166) +- [WCProductAdapter.php#L166](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L166) ## woocommerce_gla_product_description_apply_shortcodes @@ -636,7 +636,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L321](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L321) +- [WCProductAdapter.php#L321](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L321) ## woocommerce_gla_product_property_value_is_virtual @@ -644,7 +644,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L776](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L776) +- [WCProductAdapter.php#L782](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L782) ## woocommerce_gla_product_query_args @@ -652,7 +652,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductRepository.php#L376](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductRepository.php#L376) +- [ProductRepository.php#L376](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductRepository.php#L376) ## woocommerce_gla_product_view_report_page_size @@ -660,7 +660,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantReport.php#L68](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/MerchantReport.php#L68) +- [MerchantReport.php#L68](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/MerchantReport.php#L68) ## woocommerce_gla_products_delete_retry_on_failure @@ -668,7 +668,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L342](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L342) +- [ProductSyncer.php#L342](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L342) ## woocommerce_gla_products_update_retry_on_failure @@ -676,7 +676,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L286](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L286) +- [ProductSyncer.php#L286](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L286) ## woocommerce_gla_ready_for_syncing @@ -684,7 +684,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [MerchantCenterService.php#L118](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/MerchantCenterService.php#L118) +- [MerchantCenterService.php#L118](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/MerchantCenterService.php#L118) ## woocommerce_gla_request_review_failure @@ -692,9 +692,9 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [RequestReviewController.php#L110](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/RequestReviewController.php#L110) -- [RequestReviewController.php#L122](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/RequestReviewController.php#L122) -- [Middleware.php#L595](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L595) +- [RequestReviewController.php#L110](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/RequestReviewController.php#L110) +- [RequestReviewController.php#L122](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/RequestReviewController.php#L122) +- [Middleware.php#L595](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L595) ## woocommerce_gla_request_review_response @@ -702,7 +702,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Middleware.php#L547](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L547) +- [Middleware.php#L547](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L547) ## woocommerce_gla_retry_delete_coupons @@ -710,7 +710,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L443](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L443) +- [CouponSyncer.php#L443](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L443) ## woocommerce_gla_retry_update_coupons @@ -718,7 +718,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L405](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L405) +- [CouponSyncer.php#L405](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L405) ## woocommerce_gla_site_claim_failure @@ -726,10 +726,10 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Merchant.php#L93](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L93) -- [Middleware.php#L268](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L268) -- [Middleware.php#L274](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L274) -- [AccountService.php#L365](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/AccountService.php#L365) +- [Merchant.php#L93](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L93) +- [Middleware.php#L268](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L268) +- [Middleware.php#L274](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L274) +- [AccountService.php#L365](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/AccountService.php#L365) ## woocommerce_gla_site_claim_overwrite_required @@ -737,7 +737,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AccountService.php#L360](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/AccountService.php#L360) +- [AccountService.php#L360](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/AccountService.php#L360) ## woocommerce_gla_site_claim_success @@ -745,8 +745,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [Merchant.php#L90](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Merchant.php#L90) -- [Middleware.php#L263](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/Middleware.php#L263) +- [Merchant.php#L90](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Merchant.php#L90) +- [Middleware.php#L263](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/Middleware.php#L263) ## woocommerce_gla_site_url @@ -754,7 +754,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [PluginHelper.php#L188](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/PluginHelper.php#L188) +- [PluginHelper.php#L188](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/PluginHelper.php#L188) ## woocommerce_gla_site_verify_failure @@ -762,9 +762,9 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SiteVerification.php#L58](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L58) -- [SiteVerification.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L66) -- [SiteVerification.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L87) +- [SiteVerification.php#L58](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L58) +- [SiteVerification.php#L66](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L66) +- [SiteVerification.php#L87](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L87) ## woocommerce_gla_site_verify_success @@ -772,7 +772,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SiteVerification.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L85) +- [SiteVerification.php#L85](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L85) ## woocommerce_gla_supported_coupon_types @@ -780,7 +780,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L366](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L366) +- [CouponSyncer.php#L366](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L366) ## woocommerce_gla_supported_product_types @@ -788,7 +788,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductSyncer.php#L264](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductSyncer.php#L264) +- [ProductSyncer.php#L264](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductSyncer.php#L264) ## woocommerce_gla_sv_client_exception @@ -796,8 +796,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SiteVerification.php#L120](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L120) -- [SiteVerification.php#L162](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Google/SiteVerification.php#L162) +- [SiteVerification.php#L120](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L120) +- [SiteVerification.php#L162](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Google/SiteVerification.php#L162) ## woocommerce_gla_tax_excluded @@ -805,7 +805,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L595](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L595) +- [WCProductAdapter.php#L601](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L601) ## woocommerce_gla_track_event @@ -813,11 +813,11 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [SetupCompleteController.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/Ads/SetupCompleteController.php#L75) -- [CampaignController.php#L151](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/Ads/CampaignController.php#L151) -- [CampaignController.php#L229](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/Ads/CampaignController.php#L229) -- [CampaignController.php#L267](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/Ads/CampaignController.php#L267) -- [SettingsSyncController.php#L83](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L83) +- [SetupCompleteController.php#L75](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/Ads/SetupCompleteController.php#L75) +- [CampaignController.php#L151](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/Ads/CampaignController.php#L151) +- [CampaignController.php#L229](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/Ads/CampaignController.php#L229) +- [CampaignController.php#L267](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/Ads/CampaignController.php#L267) +- [SettingsSyncController.php#L83](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/API/Site/Controllers/MerchantCenter/SettingsSyncController.php#L83) ## woocommerce_gla_updated_coupon @@ -825,7 +825,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [CouponSyncer.php#L169](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Coupon/CouponSyncer.php#L169) +- [CouponSyncer.php#L169](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Coupon/CouponSyncer.php#L169) ## woocommerce_gla_url_switch_required @@ -833,7 +833,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AccountService.php#L445](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/AccountService.php#L445) +- [AccountService.php#L445](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/AccountService.php#L445) ## woocommerce_gla_url_switch_success @@ -841,7 +841,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [AccountService.php#L468](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/MerchantCenter/AccountService.php#L468) +- [AccountService.php#L468](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/MerchantCenter/AccountService.php#L468) ## woocommerce_gla_use_short_description @@ -849,7 +849,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L298](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L298) +- [WCProductAdapter.php#L298](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L298) ## woocommerce_gla_wcs_url @@ -857,8 +857,8 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [PluginHelper.php#L174](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/PluginHelper.php#L174) -- [PluginHelper.php#L177](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/PluginHelper.php#L177) +- [PluginHelper.php#L174](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/PluginHelper.php#L174) +- [PluginHelper.php#L177](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/PluginHelper.php#L177) ## woocommerce_gla_weight_unit @@ -866,7 +866,7 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [WCProductAdapter.php#L432](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/WCProductAdapter.php#L432) +- [WCProductAdapter.php#L432](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/WCProductAdapter.php#L432) ## woocommerce_hide_invisible_variations @@ -874,5 +874,5 @@ A list of hooks, e.g. `actions` and `filters`, that are defined or used in this **Used in**: -- [ProductHelper.php#L390](https://github.com/woocommerce/google-listings-and-ads/blob/951e5da8e08f42ff5f94de8b87ea4aebd242c62c/src/Product/ProductHelper.php#L390) +- [ProductHelper.php#L390](https://github.com/woocommerce/google-listings-and-ads/blob/718b8cfc612f2dd94e0390c79856326bbed44616/src/Product/ProductHelper.php#L390) diff --git a/src/Internal/DependencyManagement/GoogleServiceProvider.php b/src/Internal/DependencyManagement/GoogleServiceProvider.php index 6efca7b665..e64368656a 100644 --- a/src/Internal/DependencyManagement/GoogleServiceProvider.php +++ b/src/Internal/DependencyManagement/GoogleServiceProvider.php @@ -46,7 +46,7 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Container\ContainerInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Http\Message\RequestInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Psr\Http\Message\ResponseInterface; -use Google\Ads\GoogleAds\Util\V14\GoogleAdsFailures; +use Google\Ads\GoogleAds\Util\V16\GoogleAdsFailures; use Jetpack_Options; defined( 'ABSPATH' ) || exit; diff --git a/src/Product/WCProductAdapter.php b/src/Product/WCProductAdapter.php index 521e395dbe..42717f1222 100644 --- a/src/Product/WCProductAdapter.php +++ b/src/Product/WCProductAdapter.php @@ -572,6 +572,12 @@ protected function map_wc_shipping_weight( string $unit = 'g' ): WCProductAdapte } $weight = wc_get_weight( $this->wc_product->get_weight(), $unit ); + + // Use lb if the unit is lbs, since GMC uses lb. + if ( 'lbs' === $unit ) { + $unit = 'lb'; + } + $this->setShippingWeight( new GoogleProductShippingWeight( [ diff --git a/tests/Tools/HelperTrait/GoogleAdsClientTrait.php b/tests/Tools/HelperTrait/GoogleAdsClientTrait.php index 8ce1094478..d288b40f6b 100644 --- a/tests/Tools/HelperTrait/GoogleAdsClientTrait.php +++ b/tests/Tools/HelperTrait/GoogleAdsClientTrait.php @@ -10,50 +10,50 @@ use Automattic\WooCommerce\GoogleListingsAndAds\API\MicroTrait; use Automattic\WooCommerce\GoogleListingsAndAds\Google\Ads\GoogleAdsClient; use Exception; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; -use Google\Ads\GoogleAds\V14\Common\LocationInfo; -use Google\Ads\GoogleAds\V14\Common\Metrics; -use Google\Ads\GoogleAds\V14\Common\Segments; -use Google\Ads\GoogleAds\V14\Common\TagSnippet; -use Google\Ads\GoogleAds\V14\Common\ImageAsset; -use Google\Ads\GoogleAds\V14\Common\TextAsset; -use Google\Ads\GoogleAds\V14\Common\CallToActionAsset; -use Google\Ads\GoogleAds\V14\Common\ImageDimension; -use Google\Ads\GoogleAds\V14\Enums\AccessRoleEnum\AccessRole; -use Google\Ads\GoogleAds\V14\Enums\CampaignStatusEnum\CampaignStatus as AdsCampaignStatus; -use Google\Ads\GoogleAds\V14\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType as AdsCampaignType; -use Google\Ads\GoogleAds\V14\Enums\AssetTypeEnum\AssetType; -use Google\Ads\GoogleAds\V14\Enums\TrackingCodePageFormatEnum\TrackingCodePageFormat; -use Google\Ads\GoogleAds\V14\Enums\TrackingCodeTypeEnum\TrackingCodeType; -use Google\Ads\GoogleAds\V14\Resources\BillingSetup; -use Google\Ads\GoogleAds\V14\Resources\Campaign; -use Google\Ads\GoogleAds\V14\Resources\Asset; -use Google\Ads\GoogleAds\V14\Resources\AssetGroup; -use Google\Ads\GoogleAds\V14\Resources\AssetGroupAsset; -use Google\Ads\GoogleAds\V14\Services\AssetGroupAssetOperation; -use Google\Ads\GoogleAds\V14\Resources\CampaignBudget; -use Google\Ads\GoogleAds\V14\Resources\CampaignCriterion; -use Google\Ads\GoogleAds\V14\Resources\Campaign\ShoppingSetting; -use Google\Ads\GoogleAds\V14\Resources\ConversionAction; -use Google\Ads\GoogleAds\V14\Resources\Customer; -use Google\Ads\GoogleAds\V14\Resources\CustomerUserAccess; -use Google\Ads\GoogleAds\V14\Resources\MerchantCenterLink; -use Google\Ads\GoogleAds\V14\Resources\ShoppingPerformanceView; -use Google\Ads\GoogleAds\V14\Services\ConversionActionServiceClient; -use Google\Ads\GoogleAds\V14\Services\CustomerServiceClient; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsServiceClient; -use Google\Ads\GoogleAds\V14\Services\ListAccessibleCustomersResponse; -use Google\Ads\GoogleAds\V14\Services\ListMerchantCenterLinksResponse; -use Google\Ads\GoogleAds\V14\Services\MerchantCenterLinkServiceClient; -use Google\Ads\GoogleAds\V14\Services\MutateCampaignResult; -use Google\Ads\GoogleAds\V14\Services\MutateConversionActionResult; -use Google\Ads\GoogleAds\V14\Services\MutateConversionActionsResponse; -use Google\Ads\GoogleAds\V14\Services\MutateGoogleAdsResponse; -use Google\Ads\GoogleAds\V14\Services\MutateOperationResponse; -use Google\Ads\GoogleAds\V14\Services\MutateOperation; -use Google\Ads\GoogleAds\V14\Services\MutateAssetGroupResult; -use Google\Ads\GoogleAds\V14\Services\MutateAssetResult; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; +use Google\Ads\GoogleAds\V16\Common\LocationInfo; +use Google\Ads\GoogleAds\V16\Common\Metrics; +use Google\Ads\GoogleAds\V16\Common\Segments; +use Google\Ads\GoogleAds\V16\Common\TagSnippet; +use Google\Ads\GoogleAds\V16\Common\ImageAsset; +use Google\Ads\GoogleAds\V16\Common\TextAsset; +use Google\Ads\GoogleAds\V16\Common\CallToActionAsset; +use Google\Ads\GoogleAds\V16\Common\ImageDimension; +use Google\Ads\GoogleAds\V16\Enums\AccessRoleEnum\AccessRole; +use Google\Ads\GoogleAds\V16\Enums\CampaignStatusEnum\CampaignStatus as AdsCampaignStatus; +use Google\Ads\GoogleAds\V16\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType as AdsCampaignType; +use Google\Ads\GoogleAds\V16\Enums\AssetTypeEnum\AssetType; +use Google\Ads\GoogleAds\V16\Enums\TrackingCodePageFormatEnum\TrackingCodePageFormat; +use Google\Ads\GoogleAds\V16\Enums\TrackingCodeTypeEnum\TrackingCodeType; +use Google\Ads\GoogleAds\V16\Resources\BillingSetup; +use Google\Ads\GoogleAds\V16\Resources\Campaign; +use Google\Ads\GoogleAds\V16\Resources\Asset; +use Google\Ads\GoogleAds\V16\Resources\AssetGroup; +use Google\Ads\GoogleAds\V16\Resources\AssetGroupAsset; +use Google\Ads\GoogleAds\V16\Services\AssetGroupAssetOperation; +use Google\Ads\GoogleAds\V16\Resources\CampaignBudget; +use Google\Ads\GoogleAds\V16\Resources\CampaignCriterion; +use Google\Ads\GoogleAds\V16\Resources\Campaign\ShoppingSetting; +use Google\Ads\GoogleAds\V16\Resources\ConversionAction; +use Google\Ads\GoogleAds\V16\Resources\Customer; +use Google\Ads\GoogleAds\V16\Resources\CustomerUserAccess; +use Google\Ads\GoogleAds\V16\Resources\ShoppingPerformanceView; +use Google\Ads\GoogleAds\V16\Services\Client\ConversionActionServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\CustomerServiceClient; +use Google\Ads\GoogleAds\V16\Services\Client\ProductLinkInvitationServiceClient; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\Client\GoogleAdsServiceClient; +use Google\Ads\GoogleAds\V16\Services\ListAccessibleCustomersResponse; +use Google\Ads\GoogleAds\V16\Services\MutateCampaignResult; +use Google\Ads\GoogleAds\V16\Services\MutateConversionActionResult; +use Google\Ads\GoogleAds\V16\Services\MutateConversionActionsRequest; +use Google\Ads\GoogleAds\V16\Services\MutateConversionActionsResponse; +use Google\Ads\GoogleAds\V16\Services\MutateGoogleAdsRequest; +use Google\Ads\GoogleAds\V16\Services\MutateGoogleAdsResponse; +use Google\Ads\GoogleAds\V16\Services\MutateOperationResponse; +use Google\Ads\GoogleAds\V16\Services\MutateOperation; +use Google\Ads\GoogleAds\V16\Services\MutateAssetGroupResult; +use Google\Ads\GoogleAds\V16\Services\MutateAssetResult; use Google\ApiCore\ApiException; use Google\ApiCore\Page; use Google\ApiCore\PagedListResponse; @@ -130,7 +130,8 @@ protected function generate_campaign_mutate_mock( string $type, int $campaign_id $this->service_client->expects( $this->once() ) ->method( 'mutate' ) ->willReturnCallback( - function ( int $ads_id, array $operations ) use ( $type, $response ) { + function ( MutateGoogleAdsRequest $request ) use ( $type, $response ) { + $operations = $request->getMutateOperations(); // Assert that the campaign operation is the right type. foreach ( $operations as $operation ) { if ( 'campaign_operation' === $operation->getOperation() ) { @@ -274,7 +275,7 @@ protected function generate_ads_access_query_mock( bool $has_access ) { */ protected function generate_campaign_row_mock( array $data ): GoogleAdsRow { $setting = $this->createMock( ShoppingSetting::class ); - $setting->method( 'getSalesCountry' )->willReturn( $data['country'] ); + $setting->method( 'getFeedLabel' )->willReturn( $data['country'] ); $campaign = $this->createMock( Campaign::class ); $campaign->method( 'getId' )->willReturn( $data['id'] ); @@ -414,36 +415,20 @@ protected function generate_customer_list_mock_exception( ApiException $exceptio * @param array $links */ protected function generate_mc_link_mock( array $links ) { - $mc_link_service = $this->createMock( MerchantCenterLinkServiceClient::class ); - $this->client->method( 'getMerchantCenterLinkServiceClient' )->willReturn( $mc_link_service ); + $mc_link_service = $this->createMock( ProductLinkInvitationServiceClient::class ); + $this->client->method( 'getProductLinkInvitationServiceClient' )->willReturn( $mc_link_service ); $links = array_map( function ( $link ) { - return new MerchantCenterLink( $link ); + return ( new GoogleAdsRow() )->setProductLinkInvitation( $link ); }, $links ); - $list = $this->createMock( ListMerchantCenterLinksResponse::class ); - $list->method( 'getMerchantCenterLinks' )->willReturn( $links ); - - $mc_link_service->method( 'listMerchantCenterLinks' )->willReturn( $list ); - + $this->generate_ads_query_mock( $links ); return $mc_link_service; } - /** - * Generates a mocked exception when a Merchant Center link is requested. - * - * @param ApiException $exception - */ - protected function generate_mc_link_mock_exception( ApiException $exception ) { - $mc_link_service = $this->createMock( MerchantCenterLinkServiceClient::class ); - $this->client->method( 'getMerchantCenterLinkServiceClient' )->willReturn( $mc_link_service ); - - $mc_link_service->method( 'listMerchantCenterLinks' )->willThrowException( $exception ); - } - /** * Generate a mocked mutate conversion action response. * Asserts that set of operations contains an operation with the expected type. @@ -462,7 +447,8 @@ protected function generate_conversion_action_mutate_mock( string $type, int $ac $this->conversion_action_service->expects( $this->once() ) ->method( 'mutateConversionActions' ) ->willReturnCallback( - function ( int $ads_id, array $operations ) use ( $type, $response ) { + function ( MutateConversionActionsRequest $request ) use ( $type, $response ) { + $operations = $request->getOperations(); // Assert that the operation is the right type. foreach ( $operations as $operation ) { if ( 'conversion_action_operation' === $operation->getOperation() ) { @@ -732,7 +718,8 @@ protected function generate_asset_group_mutate_mock( string $type, int $asset_gr $this->service_client->expects( $this->once() ) ->method( 'mutate' ) ->willReturnCallback( - function ( int $ads_id, array $operations ) use ( $type, $response, $include_assets ) { + function ( MutateGoogleAdsRequest $request ) use ( $type, $response, $include_assets ) { + $operations = $request->getMutateOperations(); $operations_names = []; if ( $type === 'update' && count( $operations ) ) { @@ -855,7 +842,8 @@ protected function generate_asset_mutate_mock( string $type, array $asset ) { $this->service_client->expects( $this->once() ) ->method( 'mutate' ) ->willReturnCallback( - function ( int $ads_id, array $operations ) use ( $type, $response, $asset ) { + function ( MutateGoogleAdsRequest $request ) use ( $type, $response, $asset ) { + $operations = $request->getMutateOperations(); // Assert that the asset group operation is the right type. $operations_names = []; foreach ( $operations as $operation ) { @@ -878,9 +866,9 @@ protected function generate_asset_batch_mutate_mock( $matcher, $asset_batches_ca $this->service_client->expects( $matcher ) ->method( 'mutate' ) ->willReturnCallback( - function ( int $ads_id, array $operations ) use ( $matcher, $asset_batches_callback ) { - $responses = []; - + function ( MutateGoogleAdsRequest $request ) use ( $matcher, $asset_batches_callback ) { + $responses = []; + $operations = $request->getMutateOperations(); $asset_batches_callback( $matcher, $operations ); foreach ( $operations as $operation ) { diff --git a/tests/Unit/API/Google/AdsAssetGroupAssetTest.php b/tests/Unit/API/Google/AdsAssetGroupAssetTest.php index 648be59b84..6cb9c162f3 100644 --- a/tests/Unit/API/Google/AdsAssetGroupAssetTest.php +++ b/tests/Unit/API/Google/AdsAssetGroupAssetTest.php @@ -10,8 +10,8 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Tools\HelperTrait\GoogleAdsClientTrait; use PHPUnit\Framework\MockObject\MockObject; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\AssetFieldType; -use Google\Ads\GoogleAds\V14\Enums\AssetTypeEnum\AssetType; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; +use Google\Ads\GoogleAds\V16\Enums\AssetTypeEnum\AssetType; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; defined( 'ABSPATH' ) || exit; diff --git a/tests/Unit/API/Google/AdsAssetGroupTest.php b/tests/Unit/API/Google/AdsAssetGroupTest.php index afa425964c..d429bdd788 100644 --- a/tests/Unit/API/Google/AdsAssetGroupTest.php +++ b/tests/Unit/API/Google/AdsAssetGroupTest.php @@ -8,9 +8,9 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Options\OptionsInterface; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Framework\UnitTest; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Tools\HelperTrait\GoogleAdsClientTrait; -use Google\Ads\GoogleAds\V14\Enums\AssetGroupStatusEnum\AssetGroupStatus; -use Google\Ads\GoogleAds\V14\Enums\ListingGroupFilterTypeEnum\ListingGroupFilterType; -use Google\Ads\GoogleAds\V14\Enums\ListingGroupFilterVerticalEnum\ListingGroupFilterVertical; +use Google\Ads\GoogleAds\V16\Enums\AssetGroupStatusEnum\AssetGroupStatus; +use Google\Ads\GoogleAds\V16\Enums\ListingGroupFilterListingSourceEnum\ListingGroupFilterListingSource; +use Google\Ads\GoogleAds\V16\Enums\ListingGroupFilterTypeEnum\ListingGroupFilterType; use PHPUnit\Framework\MockObject\MockObject; use Google\ApiCore\ApiException; use Automattic\WooCommerce\GoogleListingsAndAds\Exception\ExceptionWithResponseData; @@ -82,7 +82,7 @@ public function test_create_operations() { $this->assertEquals( 'New Campaign Asset Group', $asset_group->getName() ); $this->assertEquals( $asset_group_resource_name, $listing_group->getAssetGroup() ); $this->assertEquals( ListingGroupFilterType::UNIT_INCLUDED, $listing_group->getType() ); - $this->assertEquals( ListingGroupFilterVertical::SHOPPING, $listing_group->getVertical() ); + $this->assertEquals( ListingGroupFilterListingSource::SHOPPING, $listing_group->getListingSource() ); } public function test_get_asset_groups_by_campaign_id_with_assets() { diff --git a/tests/Unit/API/Google/AdsAssetTest.php b/tests/Unit/API/Google/AdsAssetTest.php index 955c535550..4fe2aed41a 100644 --- a/tests/Unit/API/Google/AdsAssetTest.php +++ b/tests/Unit/API/Google/AdsAssetTest.php @@ -10,7 +10,7 @@ use PHPUnit\Framework\MockObject\MockObject; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\AssetFieldType; use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\CallToActionType; -use Google\Ads\GoogleAds\Util\V14\ResourceNames; +use Google\Ads\GoogleAds\Util\V16\ResourceNames; use Automattic\WooCommerce\GoogleListingsAndAds\Proxies\WP; use Exception; use WP_Error; diff --git a/tests/Unit/API/Google/AdsCampaignCriterionTest.php b/tests/Unit/API/Google/AdsCampaignCriterionTest.php index cc3f566beb..091b86f7c0 100644 --- a/tests/Unit/API/Google/AdsCampaignCriterionTest.php +++ b/tests/Unit/API/Google/AdsCampaignCriterionTest.php @@ -6,7 +6,7 @@ use Automattic\WooCommerce\GoogleListingsAndAds\API\Google\AdsCampaignCriterion; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Framework\UnitTest; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Tools\HelperTrait\GoogleAdsClientTrait; -use Google\Ads\GoogleAds\V14\Enums\CampaignCriterionStatusEnum\CampaignCriterionStatus; +use Google\Ads\GoogleAds\V16\Enums\CampaignCriterionStatusEnum\CampaignCriterionStatus; defined( 'ABSPATH' ) || exit; diff --git a/tests/Unit/API/Google/AdsConversionActionTest.php b/tests/Unit/API/Google/AdsConversionActionTest.php index 8a971d071b..7e6b7499ec 100644 --- a/tests/Unit/API/Google/AdsConversionActionTest.php +++ b/tests/Unit/API/Google/AdsConversionActionTest.php @@ -8,7 +8,7 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Framework\UnitTest; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Tools\HelperTrait\GoogleAdsClientTrait; use Exception; -use Google\Ads\GoogleAds\V14\Enums\ConversionActionStatusEnum\ConversionActionStatus; +use Google\Ads\GoogleAds\V16\Enums\ConversionActionStatusEnum\ConversionActionStatus; use Google\ApiCore\ApiException; use PHPUnit\Framework\MockObject\MockObject; diff --git a/tests/Unit/API/Google/AdsTest.php b/tests/Unit/API/Google/AdsTest.php index 9a6fbaaf0f..e35d7c9590 100644 --- a/tests/Unit/API/Google/AdsTest.php +++ b/tests/Unit/API/Google/AdsTest.php @@ -10,8 +10,10 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Framework\UnitTest; use Automattic\WooCommerce\GoogleListingsAndAds\Tests\Tools\HelperTrait\GoogleAdsClientTrait; use Exception; -use Google\Ads\GoogleAds\V14\Enums\BillingSetupStatusEnum\BillingSetupStatus as AdsBillingSetupStatus; -use Google\Ads\GoogleAds\V14\Enums\MerchantCenterLinkStatusEnum\MerchantCenterLinkStatus; +use Google\Ads\GoogleAds\V16\Enums\BillingSetupStatusEnum\BillingSetupStatus as AdsBillingSetupStatus; +use Google\Ads\GoogleAds\V16\Enums\ProductLinkInvitationStatusEnum\ProductLinkInvitationStatus; +use Google\Ads\GoogleAds\V16\Resources\MerchantCenterLinkInvitationIdentifier; +use Google\Ads\GoogleAds\V16\Resources\ProductLinkInvitation; use Google\ApiCore\ApiException; use PHPUnit\Framework\MockObject\MockObject; @@ -156,6 +158,7 @@ public function test_get_billing_status_exception() { } public function test_accept_merchant_link_not_available() { + $this->options->method( 'get_ads_id' )->willReturn( self::TEST_ADS_ID ); $this->generate_mc_link_mock( [] ); $this->expectException( Exception::class ); $this->expectExceptionMessage( 'Merchant link is not available to accept' ); @@ -164,25 +167,28 @@ public function test_accept_merchant_link_not_available() { } public function test_accept_merchant_link_already_accepted() { - $link = [ - 'id' => self::TEST_MERCHANT_ID, - 'status' => MerchantCenterLinkStatus::ENABLED, - ]; - + $this->options->method( 'get_ads_id' )->willReturn( self::TEST_ADS_ID ); + $link = new ProductLinkInvitation(); + $mc = new MerchantCenterLinkInvitationIdentifier(); + $link->setStatus( ProductLinkInvitationStatus::ACCEPTED ); + $mc->setMerchantCenterId( self::TEST_MERCHANT_ID ); + $link->setMerchantCenter( $mc ); $service = $this->generate_mc_link_mock( [ $link ] ); - $service->expects( $this->never() )->method( 'mutateMerchantCenterLink' ); + $service->expects( $this->never() )->method( 'updateProductLinkInvitation' ); $this->ads->accept_merchant_link( self::TEST_MERCHANT_ID ); } public function test_accept_merchant_link() { - $link = [ - 'id' => self::TEST_MERCHANT_ID, - 'status' => MerchantCenterLinkStatus::PENDING, - ]; + $this->options->method( 'get_ads_id' )->willReturn( self::TEST_ADS_ID ); + $link = new ProductLinkInvitation(); + $mc = new MerchantCenterLinkInvitationIdentifier(); + $link->setStatus( ProductLinkInvitationStatus::PENDING_APPROVAL ); + $mc->setMerchantCenterId( self::TEST_MERCHANT_ID ); + $link->setMerchantCenter( $mc ); $service = $this->generate_mc_link_mock( [ $link ] ); - $service->expects( $this->once() )->method( 'mutateMerchantCenterLink' ); + $service->expects( $this->once() )->method( 'updateProductLinkInvitation' ); $this->ads->accept_merchant_link( self::TEST_MERCHANT_ID ); } diff --git a/tests/Unit/API/Google/MerchantMetricsTest.php b/tests/Unit/API/Google/MerchantMetricsTest.php index d3176c6bba..8ab6475a48 100644 --- a/tests/Unit/API/Google/MerchantMetricsTest.php +++ b/tests/Unit/API/Google/MerchantMetricsTest.php @@ -16,9 +16,9 @@ use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Google\Service\ShoppingContent\SearchResponse; use Automattic\WooCommerce\GoogleListingsAndAds\Vendor\Google\Service\ShoppingContent\Resource\Reports; use DateTime; -use Google\Ads\GoogleAds\V14\Common\Metrics as AdMetrics; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsRow; -use Google\Ads\GoogleAds\V14\Services\GoogleAdsServiceClient; +use Google\Ads\GoogleAds\V16\Common\Metrics as AdMetrics; +use Google\Ads\GoogleAds\V16\Services\GoogleAdsRow; +use Google\Ads\GoogleAds\V16\Services\Client\GoogleAdsServiceClient; use Google\ApiCore\Page; use Google\ApiCore\PagedListResponse; use PHPUnit\Framework\MockObject\MockObject; diff --git a/tests/Unit/Product/WCProductAdapterTest.php b/tests/Unit/Product/WCProductAdapterTest.php index a1e50ceb85..290abb571b 100644 --- a/tests/Unit/Product/WCProductAdapterTest.php +++ b/tests/Unit/Product/WCProductAdapterTest.php @@ -930,6 +930,28 @@ public function test_shipping_dimensions_and_weight_units_use_default_if_wc_opti $this->assertEquals( 1000, $adapted_product->getShippingWeight()->getValue() ); } + public function test_shipping_weight_unit_uses_lb_if_wc_option_is_lbs() { + update_option( 'woocommerce_weight_unit', 'lbs' ); + + $product = WC_Helper_Product::create_simple_product( + false, + [ + 'height' => '3', + 'length' => '4', + 'width' => '5', + 'weight' => '1', + ] + ); + + $adapted_product = new WCProductAdapter( + [ + 'wc_product' => $product, + 'targetCountry' => 'US', + ] + ); + $this->assertEquals( 'lb', $adapted_product->getShippingWeight()->getUnit() ); + } + /** * @param array $shipping_dimensions * diff --git a/tests/bootstrap.php b/tests/bootstrap.php index cb098d11af..f8550664e7 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,6 +3,7 @@ namespace Automattic\WooCommerce\GoogleListingsAndAds\Tests; +use DG\BypassFinals; use WC_Install; define( 'GLA_TESTS_DIR', __DIR__ ); @@ -34,6 +35,10 @@ // Require the composer autoloader. require_once dirname( __DIR__ ) . '/vendor/autoload.php'; +// Enable this Library for avoiding errors mocking final Google API Classes. +// @see https://github.com/googleads/google-ads-php/issues/1008 +BypassFinals::enable(); + // Give access to tests_add_filter() function. require_once "{$wp_tests_dir}/includes/functions.php"; diff --git a/tests/e2e/bin/test-env-setup.sh b/tests/e2e/bin/test-env-setup.sh index 9cab2e369d..3fd6495ad8 100755 --- a/tests/e2e/bin/test-env-setup.sh +++ b/tests/e2e/bin/test-env-setup.sh @@ -3,6 +3,12 @@ echo -e 'Activate twentytwentytwo theme \n' wp-env run tests-cli wp theme activate twentytwentytwo +echo -e 'Install WooCommerce \n' +wp-env run tests-cli -- wp plugin install woocommerce --activate + +echo -e 'Activate Google Listings and Ads \n' +wp-env run tests-cli -- wp plugin activate google-listings-and-ads + echo -e 'Update URL structure \n' wp-env run tests-cli -- wp rewrite structure '/%postname%/' --hard diff --git a/tests/e2e/utils/customer.js b/tests/e2e/utils/customer.js index cad0b9b6b9..b82f5301ba 100644 --- a/tests/e2e/utils/customer.js +++ b/tests/e2e/utils/customer.js @@ -35,15 +35,15 @@ export async function singleProductAddToCart( page, productID ) { } /** - * Adds a related product to the cart. + * Adds a related single product to the cart. * * @param {Page} page * @return {number} Product ID of the added product. */ export async function relatedProductAddToCart( page ) { const addToCart = ( await page.locator( '.related.products' ).isVisible() ) - ? '.related.products .add_to_cart_button' - : '.wp-block-woocommerce-related-products .add_to_cart_button'; + ? '.related.products .add_to_cart_button.product_type_simple' + : '.wp-block-woocommerce-related-products .add_to_cart_button.product_type_simple'; const addToCartButton = await page.locator( addToCart ).first(); await addToCartButton.click(); diff --git a/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js b/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js index 99a64e791c..a3990a3e65 100644 --- a/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js +++ b/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js @@ -37,22 +37,13 @@ export default class StoreRequirements extends MockRequests { ); } - /** - * Get components-card class. - * - * @return {import('@playwright/test').Locator} Get components-card class. - */ - getComponentsCard() { - return this.page.locator( '.components-card' ); - } - /** * Get phone verification card. * * @return {import('@playwright/test').Locator} Get phone verification card. */ getPhoneVerificationCard() { - return this.getComponentsCard().first(); + return this.page.locator( '.gla-phone-number-card' ); } /** @@ -61,7 +52,7 @@ export default class StoreRequirements extends MockRequests { * @return {import('@playwright/test').Locator} Get store address card. */ getStoreAddressCard() { - return this.getComponentsCard().nth( 1 ); + return this.page.locator( '.gla-store-address-card' ); } /** @@ -70,7 +61,7 @@ export default class StoreRequirements extends MockRequests { * @return {import('@playwright/test').Locator} Get checklist card. */ getChecklistCard() { - return this.getComponentsCard().nth( 2 ); + return this.page.locator( '.gla-pre-launch-checklist' ); } /**