Plugin Directory

Changeset 3238118


Ignore:
Timestamp:
02/10/2025 06:32:31 PM (10 months ago)
Author:
google
Message:

Update to version 1.146.0 from GitHub

Location:
google-site-kit
Files:
100 added
96 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-site-kit/tags/1.146.0/dist/manifest.php

    r3229883 r3238118  
    2020    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2121    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    22     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0167cbd9e2a4e951c2c2.min.css", null ),
     22    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-1a1b3dd6836e74847e00.min.css", null ),
    2323    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-281d66e21d2b87430998.min.css", null ),
    2424    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2525    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-55d9d8bb13cf249a2389.min.css", null ),
    26     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-0e5fcb2614a2df8b4141.js", null ),
    27     'googlesitekit-runtime'                                => array( "runtime-7900ebf0cb27fa989ac7.js", null ),
    28     'googlesitekit-activation'                             => array( "googlesitekit-activation-0ff4bb4905875a3af96d.js", null ),
    29     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-1bc5a979d40644f428b9.js", null ),
    30     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-3eb079e3b867b0628d63.js", null ),
    31     'googlesitekit-api'                                    => array( "googlesitekit-api-56127018cb7e490cef83.js", null ),
    32     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-cd1b1b91f7b0b537fb1c.js", null ), array( "googlesitekit-components-gm3-8508ed7feed06dfd7cea.js", null ) ),
    33     'googlesitekit-data'                                   => array( "googlesitekit-data-0a0301705fe2a7e3ea13.js", null ),
    34     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-38cfea41da192d1bc108.js", null ),
    35     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-2a54fd2f0e87dc2c9475.js", null ),
    36     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-f7b7542d42fef36c823b.js", null ),
    37     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-1bf7f3343b392b9d3d36.js", null ),
    38     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-7de58a4f6164bf6e0b50.js", null ),
    39     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-41ce7126b0d8da211ca8.js", null ),
    40     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-4da8f8cf7c833e75c20b.js", null ),
    41     'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-3ee8a23dcaf39401f05a.js", null ),
    42     'googlesitekit-modules'                                => array( "googlesitekit-modules-3149aa67bd387f1e1ecc.js", null ),
    43     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-eda91d5656699d965a11.js", null ),
    44     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-60e0039459ccbf52f2dc.js", null ),
    45     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-e7215bb257eaff98a241.js", null ),
    46     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7e61c64f50cba689589c.js", null ),
    47     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-c83637e628e0caaef7d4.js", null ),
    48     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-ee6b9d229e6d6c34c65c.js", null ),
    49     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-ee4e9dd0a0285290e10e.js", null ),
    50     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-b2f7e90981d1eabf1a0c.js", null ),
    51     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-576ef786c988dd3d308a.js", null ),
    52     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-37387dc58c34dd8ec319.js", null ),
    53     'googlesitekit-settings'                               => array( "googlesitekit-settings-f0011b69cd7c80cd340a.js", null ),
    54     'googlesitekit-splash'                                 => array( "googlesitekit-splash-0e6568b993910dcbfb85.js", null ),
    55     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-77dfa9da5c9848070722.js", null ),
    56     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-9f86e66067a4d5d6be4f.js", null ),
    57     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-c774dda1d72e62c09f79.js", null ),
     26    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-55f6d4109c59b75ef2bd.js", null ),
     27    'googlesitekit-runtime'                                => array( "runtime-cafb5a04ad2af33b7709.js", null ),
     28    'googlesitekit-activation'                             => array( "googlesitekit-activation-859303eb6e15c09c3a50.js", null ),
     29    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-ff4f4fe3cc2fc49e0dda.js", null ),
     30    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-9ee6cdb0be43ea55ded4.js", null ),
     31    'googlesitekit-api'                                    => array( "googlesitekit-api-9f1616f40adbca43e6b8.js", null ),
     32    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-7945eb0cdbd7dc3a89c2.js", null ), array( "googlesitekit-components-gm3-f995cfcb85091ab1e560.js", null ) ),
     33    'googlesitekit-data'                                   => array( "googlesitekit-data-590b288a64d1660dbc11.js", null ),
     34    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-c2f63f0c0adfa5c1bb08.js", null ),
     35    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-4bd0ca7dbf15fff9fb97.js", null ),
     36    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-dc7146f24a9f4d40e709.js", null ),
     37    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-7db934d367461124f5b8.js", null ),
     38    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-1542da3bbef03cd01780.js", null ),
     39    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-b0eeab16b25065093d82.js", null ),
     40    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-a4bcd8e2d49c8c193c4e.js", null ),
     41    'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-70ed1134dac53010fa40.js", null ),
     42    'googlesitekit-modules'                                => array( "googlesitekit-modules-1a2ef4f5ec6f6f1b060c.js", null ),
     43    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-23c0496d89342f02d84d.js", null ),
     44    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-4c9f3e82ede5101a7eec.js", null ),
     45    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-481b89c2cd44559a7bb4.js", null ),
     46    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-682896da4133e08c66ab.js", null ),
     47    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-7ec25dde6792354d0eba.js", null ),
     48    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-1c6864fceeeff7358e12.js", null ),
     49    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-0c7629ea71e0e833b0c2.js", null ),
     50    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-c8b6022c7b86c9ad9742.js", null ),
     51    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-b81ae6975e8afcf98876.js", null ),
     52    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-48e8493ea0e91c0facb6.js", null ),
     53    'googlesitekit-settings'                               => array( "googlesitekit-settings-0c4ffef12bd5de9a413b.js", null ),
     54    'googlesitekit-splash'                                 => array( "googlesitekit-splash-e5aa53e206c5c1ddcc14.js", null ),
     55    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-4af8721f3482ada06493.js", null ),
     56    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-c8a23c2f9e2b270ac4c9.js", null ),
     57    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-80711a59677604d769b2.js", null ),
    5858);
  • google-site-kit/tags/1.146.0/google-site-kit.php

    r3229883 r3238118  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.145.0
     14 * Version:           1.146.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.145.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.146.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/tags/1.146.0/includes/Core/Storage/Post_Meta.php

    r3118692 r3238118  
    1818 * @ignore
    1919 */
    20 final class Post_Meta implements Post_Meta_Interface {
     20final class Post_Meta implements Meta_Interface {
    2121
    2222    /**
  • google-site-kit/tags/1.146.0/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php

    r3229883 r3238118  
    137137        return array(
    138138            'first_party_mode_is_enabled'               => array(
    139                 'label' => __( 'First-party mode: Enabled', 'google-site-kit' ),
    140                 'value' => $this->health_check_debug_field_value( $settings['isEnabled'] ),
     139                'label' => __( 'First-party mode', 'google-site-kit' ),
     140                'value' => ( true === $settings['isEnabled'] ) ? __( 'Enabled', 'google-site-kit' ) : __( 'Disabled', 'google-site-kit' ),
    141141                'debug' => $this->health_check_debug_field_debug( $settings['isEnabled'] ),
    142142            ),
  • google-site-kit/tags/1.146.0/includes/Core/Util/Reset.php

    r3118692 r3238118  
    113113        $this->delete_user_options( 'site' );
    114114        $this->delete_post_meta( 'site' );
     115        $this->delete_term_meta( 'site' );
    115116
    116117        if ( $this->context->is_network_mode() ) {
     
    118119            $this->delete_user_options( 'network' );
    119120            $this->delete_post_meta( 'network' );
     121            $this->delete_term_meta( 'network' );
    120122        }
    121123
     
    221223
    222224    /**
     225     * Deletes all Site Kit term meta settings.
     226     *
     227     * @since 1.146.0
     228     *
     229     * @param string $scope Scope of the deletion ('site' or 'network').
     230     */
     231    private function delete_term_meta( $scope ) {
     232        global $wpdb;
     233
     234        $sites = array();
     235        if ( 'network' === $scope ) {
     236            $sites = get_sites(
     237                array(
     238                    'fields' => 'ids',
     239                    'number' => 9999999,
     240                )
     241            );
     242        } else {
     243            $sites[] = get_current_blog_id();
     244        }
     245
     246        foreach ( $sites as $site_id ) {
     247            $prefix = $wpdb->get_blog_prefix( $site_id );
     248
     249            // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     250            $wpdb->query(
     251                $wpdb->prepare(
     252                    "DELETE FROM {$prefix}termmeta WHERE `meta_key` LIKE %s", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     253                    static::KEY_PATTERN
     254                )
     255            );
     256        }
     257    }
     258
     259    /**
    223260     * Gets related REST routes.
    224261     *
  • google-site-kit/tags/1.146.0/includes/Modules/Reader_Revenue_Manager.php

    r3229883 r3238118  
    3333use Google\Site_Kit\Core\Site_Health\Debug_Data;
    3434use Google\Site_Kit\Core\Storage\Post_Meta;
     35use Google\Site_Kit\Core\Storage\Term_Meta;
    3536use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard;
    3637use Google\Site_Kit\Core\Tags\Guards\Tag_Verify_Guard;
     
    3839use Google\Site_Kit\Core\Util\URL;
    3940use Google\Site_Kit\Modules\Reader_Revenue_Manager\Post_Product_ID;
     41use Google\Site_Kit\Modules\Reader_Revenue_Manager\Term_Product_ID;
    4042use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings;
    41 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState;
     43use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_Publication;
    4244use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard;
    4345use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers;
     
    7476        $this->register_scopes_hook();
    7577
    76         $synchronize_onboarding_state = new Synchronize_OnboardingState(
     78        $synchronize_publication = new Synchronize_Publication(
    7779            $this,
    7880            $this->user_options
    7981        );
    80         $synchronize_onboarding_state->register();
     82        $synchronize_publication->register();
    8183
    8284        if ( Feature_Flags::enabled( 'rrmModuleV2' ) && $this->is_connected() ) {
     
    8587            $post_product_id = new Post_Product_ID( $post_meta, $publication_id );
    8688            $post_product_id->register();
    87         }
    88 
    89         add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
    90         add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
     89
     90            $term_meta       = new Term_Meta();
     91            $term_product_id = new Term_Product_ID( $term_meta, $publication_id );
     92            $term_product_id->register();
     93        }
     94
     95        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
     96        add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
    9197
    9298        // Reader Revenue Manager tag placement logic.
  • google-site-kit/tags/1.146.0/includes/Modules/Reader_Revenue_Manager/Post_Product_ID.php

    r3229883 r3238118  
    1212
    1313use Google\Site_Kit\Core\Storage\Post_Meta;
    14 use Google\Site_Kit\Core\Storage\Post_Meta_Setting;
     14use Google\Site_Kit\Core\Storage\Meta_Setting_Trait;
    1515
    1616/**
     
    2121 * @ignore
    2222 */
    23 class Post_Product_ID extends Post_Meta_Setting {
     23class Post_Product_ID {
     24
     25    use Meta_Setting_Trait;
     26
    2427    /**
    2528     * Publication ID.
     
    4043     */
    4144    public function __construct( Post_Meta $post_meta, string $publication_id ) {
    42         parent::__construct( $post_meta );
    43 
     45        $this->meta           = $post_meta;
    4446        $this->publication_id = $publication_id;
    4547    }
     
    5759
    5860    /**
     61     * Returns the object type.
     62     *
     63     * @since 1.146.0
     64     *
     65     * @return string Object type.
     66     */
     67    protected function get_object_type(): string {
     68        return 'post';
     69    }
     70
     71    /**
    5972     * Gets the `show_in_rest` value for this postmeta setting value.
    6073     *
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google.php

    r3229883 r3238118  
    8282
    8383    /**
     84     * WooCommerce instance.
     85     *
     86     * @since 1.146.0
     87     * @var WooCommerce
     88     */
     89    protected $woocommerce;
     90
     91    /**
    8492     * Constructor.
    8593     *
     
    101109        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    102110        $this->existing_client_id = new Existing_Client_ID( $this->options );
     111        $this->woocommerce        = new WooCommerce( $this->context );
    103112    }
    104113
     
    112121        add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) );
    113122
    114         add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_existing_client_id' ), 10 );
     123        add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_module_data' ), 10 );
    115124
    116125        add_action(
     
    309318
    310319    /**
    311      * Renders the Sign in with Google JS script tags, One-tap code, and
     320     * Renders the Sign in with Google JS script tags, One Tap code, and
    312321     * buttons.
    313322     *
     
    329338
    330339        // If this is not the WordPress or WooCommerce login page, check to
    331         // see if "One-tap enabled on all pages" is set first. If it isnt:
     340        // see if "One Tap enabled on all pages" is set first. If it isnt:
    332341        // don't render the Sign in with Google JS.
    333342        if ( ! $is_wp_login && ! $is_woocommerce_login && ! $settings['oneTapOnAllPages'] ) {
     
    353362        // Whether buttons will be rendered/transformed on this page.
    354363        $render_buttons = $is_wp_login || $is_woocommerce_login;
     364        $render_one_tap = ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() );
     365
     366        // If we aren't rendering buttons or One-tap, return early.
     367        if ( ! $render_buttons && ! $render_one_tap ) {
     368            return;
     369        }
     370
     371        // Set the cookie time to live to 5 minutes. If the redirect_to is empty,
     372        // set the cookie to expire immediately.
     373        $cookie_expire_time = 300000;
     374        if ( empty( $redirect_to ) ) {
     375            $cookie_expire_time *= -1;
     376        }
    355377
    356378        // Render the Sign in with Google script.
     
    369391                body: new URLSearchParams( response )
    370392            } );
    371             if ( res.ok && res.redirected ) {
    372                 location.assign( res.url );
    373             }
     393
     394            <?php if ( empty( $redirect_to ) && ! $render_buttons && $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     395                location.reload();
     396            <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     397                if ( res.ok && res.redirected ) {
     398                    location.assign( res.url );
     399                }
     400            <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    374401        } catch( error ) {
    375402            console.error( error );
     
    391418
    392419        <?php if ( $is_woocommerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    393             for ( const login of document.getElementsByClassName( 'login' ) ) {
    394                 login.insertBefore( parent, login.firstChild );
     420            parent.classList.add( 'woocommerce-form-row', 'form-row' );
     421            const form = document.querySelector( '.woocommerce-form.login' );
     422            if ( form ) {
     423                form.insertBefore( parent, form.firstChild );
    395424            }
    396425        <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    397426
    398427        google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> );
    399 
    400         <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    401             const expires = new Date();
    402             expires.setTime( expires.getTime() + 300000 );<?php // 5 minutes ?>
    403             document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires="  + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    404         <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    405428    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    406429
    407     <?php if ( ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     430    <?php if ( $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    408431        google.accounts.id.prompt();
     432    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     433
     434    <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     435        const expires = new Date();
     436        expires.setTime( expires.getTime() + <?php echo esc_js( $cookie_expire_time ); ?> );
     437        document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires=" + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    409438    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    410439} )();
     
    480509            'sign_in_with_google_use_snippet'              => array(
    481510                /* translators: %s: Sign in with Google service name */
    482                 'label' => sprintf( __( '%s: One-tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
     511                'label' => sprintf( __( '%s: One Tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
    483512                'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ),
    484513                'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no',
     
    530559        $wp_login_url = wp_login_url();
    531560
    532         $woo_commerce = new WooCommerce( $this->context );
    533         if ( $woo_commerce->is_active() ) {
     561        if ( $this->woocommerce->is_active() ) {
    534562            $wc_login_page_id = wc_get_page_id( 'myaccount' );
    535563            $wc_login_url     = get_permalink( $wc_login_page_id );
     
    670698
    671699    /**
    672      * Exposes an existing client ID from a previous connection
    673      * to JS via _googlesitekitModulesData.
     700     * Exposes inline module data to JS via _googlesitekitModulesData.
    674701     *
    675702     * @since 1.142.0
     703     * @since 1.146.0 Added isWooCommerceActive and isWooCommerceRegistrationEnabled to the inline data.
    676704     *
    677705     * @param array $modules_data Inline modules data.
    678706     * @return array Inline modules data.
    679707     */
    680     protected function inline_existing_client_id( $modules_data ) {
     708    protected function inline_module_data( $modules_data ) {
     709        $inline_data = array();
     710
    681711        $existing_client_id = $this->existing_client_id->get();
    682 
    683712        if ( $existing_client_id ) {
    684             // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
    685             $modules_data['sign-in-with-google'] = array(
    686                 'existingClientID' => $existing_client_id,
    687             );
    688         }
     713            $inline_data['existingClientID'] = $existing_client_id;
     714        }
     715
     716        $is_woocommerce_active            = $this->woocommerce->is_active();
     717        $woocommerce_registration_enabled = $is_woocommerce_active ? get_option( 'woocommerce_enable_myaccount_registration' ) : null;
     718
     719        $inline_data['isWooCommerceActive']              = $is_woocommerce_active;
     720        $inline_data['isWooCommerceRegistrationEnabled'] = $is_woocommerce_active && 'yes' === $woocommerce_registration_enabled;
     721
     722        // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
     723        $modules_data['sign-in-with-google'] = $inline_data;
    689724
    690725        return $modules_data;
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google/Authenticator.php

    r3229883 r3238118  
    134134
    135135        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
    136         $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     136        $cookie_redirect_to = $this->get_cookie_redirect( $input );
    137137        if ( ! empty( $cookie_redirect_to ) ) {
    138138            $redirect_to = $cookie_redirect_to;
    139 
    140             if ( ! headers_sent() ) {
    141                 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
    142                 setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
    143             }
    144139        }
    145140
     
    335330        return dirname( wp_parse_url( wp_login_url(), PHP_URL_PATH ) );
    336331    }
     332
     333    /**
     334     * Gets the redirect URL from the cookie and clears the cookie.
     335     *
     336     * @since 1.146.0
     337     *
     338     * @param Input $input Input instance.
     339     * @return string Redirect URL.
     340     */
     341    protected function get_cookie_redirect( $input ) {
     342        $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     343        if ( ! empty( $cookie_redirect_to ) && ! headers_sent() ) {
     344            // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
     345            setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
     346        }
     347
     348        return $cookie_redirect_to;
     349    }
    337350}
  • google-site-kit/tags/1.146.0/includes/Modules/Sign_In_With_Google/WooCommerce_Authenticator.php

    r3229883 r3238118  
    4343     *
    4444     * @since 1.145.0
     45     * @since 1.146.0 Updated to take into account redirect URL from cookie.
    4546     *
    4647     * @param WP_User $user User object.
     
    4950     */
    5051    protected function get_redirect_url( $user, $input ) {
    51         $redirect = wc_get_page_permalink( 'myaccount' );
    52         return apply_filters( 'woocommerce_login_redirect', $redirect, $user );
     52        $redirect_to = wc_get_page_permalink( 'myaccount' );
     53
     54        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
     55        $cookie_redirect_to = $this->get_cookie_redirect( $input );
     56        if ( ! empty( $cookie_redirect_to ) ) {
     57            $redirect_to = $cookie_redirect_to;
     58        }
     59
     60        return apply_filters( 'woocommerce_login_redirect', $redirect_to, $user );
    5361    }
    5462}
  • google-site-kit/tags/1.146.0/includes/vendor/composer/autoload_classmap.php

    r3229883 r3238118  
    158158    'Google\\Site_Kit\\Core\\Storage\\Encrypted_Options' => $baseDir . '/Core/Storage/Encrypted_Options.php',
    159159    'Google\\Site_Kit\\Core\\Storage\\Encrypted_User_Options' => $baseDir . '/Core/Storage/Encrypted_User_Options.php',
     160    'Google\\Site_Kit\\Core\\Storage\\Meta_Interface' => $baseDir . '/Core/Storage/Meta_Interface.php',
     161    'Google\\Site_Kit\\Core\\Storage\\Meta_Setting_Trait' => $baseDir . '/Core/Storage/Meta_Setting_Trait.php',
    160162    'Google\\Site_Kit\\Core\\Storage\\Options' => $baseDir . '/Core/Storage/Options.php',
    161163    'Google\\Site_Kit\\Core\\Storage\\Options_Interface' => $baseDir . '/Core/Storage/Options_Interface.php',
    162164    'Google\\Site_Kit\\Core\\Storage\\Post_Meta' => $baseDir . '/Core/Storage/Post_Meta.php',
    163     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Interface' => $baseDir . '/Core/Storage/Post_Meta_Interface.php',
    164     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Setting' => $baseDir . '/Core/Storage/Post_Meta_Setting.php',
    165165    'Google\\Site_Kit\\Core\\Storage\\Setting' => $baseDir . '/Core/Storage/Setting.php',
    166166    'Google\\Site_Kit\\Core\\Storage\\Setting\\List_Setting' => $baseDir . '/Core/Storage/Setting/List_Setting.php',
     
    169169    'Google\\Site_Kit\\Core\\Storage\\Setting_With_Owned_Keys_Trait' => $baseDir . '/Core/Storage/Setting_With_Owned_Keys_Trait.php',
    170170    'Google\\Site_Kit\\Core\\Storage\\Setting_With_ViewOnly_Keys_Interface' => $baseDir . '/Core/Storage/Setting_With_ViewOnly_Keys_Interface.php',
     171    'Google\\Site_Kit\\Core\\Storage\\Term_Meta' => $baseDir . '/Core/Storage/Term_Meta.php',
    171172    'Google\\Site_Kit\\Core\\Storage\\Transients' => $baseDir . '/Core/Storage/Transients.php',
    172173    'Google\\Site_Kit\\Core\\Storage\\User_Aware_Interface' => $baseDir . '/Core/Storage/User_Aware_Interface.php',
     
    310311    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Post_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Post_Product_ID.php',
    311312    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php',
    312     'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php',
     313    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_Publication' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_Publication.php',
    313314    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php',
    314315    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php',
     316    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Term_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Term_Product_ID.php',
    315317    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Web_Tag' => $baseDir . '/Modules/Reader_Revenue_Manager/Web_Tag.php',
    316318    'Google\\Site_Kit\\Modules\\Search_Console' => $baseDir . '/Modules/Search_Console.php',
  • google-site-kit/tags/1.146.0/readme.txt

    r3229883 r3238118  
    55Tested up to:      6.7
    66Requires PHP:      7.4
    7 Stable tag:        1.145.0
     7Stable tag:        1.146.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.145.0 =
     112= 1.146.0 =
    113113
    114114**Enhanced**
    115115
    116 * Add Site Health information for Reader Revenue Manager expansions. See [#9974](https://github.com/google/site-kit-wp/issues/9974).
    117 * Add an empty RRM V2 JavaScript entry point for the WordPress block editor, with functionality to be added in subsequent issues. See [#9957](https://github.com/google/site-kit-wp/issues/9957).
    118 * Add mechanism to store post-level Reader Revenue Manager settings. See [#9955](https://github.com/google/site-kit-wp/issues/9955).
    119 * Update Reader Revenue Manager module settings infrastructure. See [#9951](https://github.com/google/site-kit-wp/issues/9951).
    120 * Add a trigger for a survey when the user sees the FPM setup banner, and one when the user enables FPM, in order to help track usage of the feature. See [#9940](https://github.com/google/site-kit-wp/issues/9940).
    121 * Update copy on disconnect module modal. See [#9935](https://github.com/google/site-kit-wp/issues/9935).
    122 * Standardize the capitalization of "First-party mode" across the plugin for consistency. See [#9902](https://github.com/google/site-kit-wp/issues/9902).
    123 * Ensure the Reader Revenue Manager Setup CTA does not appear alongside other CTAs. See [#9889](https://github.com/google/site-kit-wp/issues/9889).
    124 * Add error handling to the First-party mode setup banner to display errors and prevent premature dismissal when saving settings fail. See [#9846](https://github.com/google/site-kit-wp/issues/9846).
    125 * Update auth error notification to use new notifications infrastructure. See [#9284](https://github.com/google/site-kit-wp/issues/9284).
    126 * Update tooltip tours to display on smaller screen sizes. See [#3003](https://github.com/google/site-kit-wp/issues/3003).
     116* Add warning to users when Sign in with Google One-tap appears site-wide without open user registrations. See [#10079](https://github.com/google/site-kit-wp/issues/10079).
     117* Update the Reader Revenue Manager settings view screen to include new settings introduced in Phase 2. See [#10067](https://github.com/google/site-kit-wp/issues/10067).
     118* Add a reusable chip multi-select component. See [#10064](https://github.com/google/site-kit-wp/issues/10064).
     119* Update the Reader Revenue Manager setup CTA banner copy to highlight paywall support when the feature flag is enabled. See [#10063](https://github.com/google/site-kit-wp/issues/10063).
     120* Add mechanism to clear term meta on Site Kit reset. See [#10061](https://github.com/google/site-kit-wp/issues/10061).
     121* Add mechanism to store term-level Reader Revenue Manager settings. See [#9956](https://github.com/google/site-kit-wp/issues/9956).
     122* Add mechanism to synchronize Reader Revenue Manager publication information. See [#9954](https://github.com/google/site-kit-wp/issues/9954).
     123* Add mechanism to reset publication-specific information when the publication is changed. See [#9953](https://github.com/google/site-kit-wp/issues/9953).
     124* Update Reader Revenue Manager publication selection to populate new settings. See [#9952](https://github.com/google/site-kit-wp/issues/9952).
     125* Add infrastructure to interface with WordPress term metadata. See [#9949](https://github.com/google/site-kit-wp/issues/9949).
     126* Improve the styling of the Sign in with Google button on WooCommerce login forms. See [#9932](https://github.com/google/site-kit-wp/issues/9932).
     127* Update Ads settings view screen to display items in the correct order. See [#9908](https://github.com/google/site-kit-wp/issues/9908).
     128* Update the First-party mode status in Site Health to use "Enabled" or "Disabled" instead of "Yes" or "No" and update the label from "First-party mode: Enabled" to "First-party mode". See [#9904](https://github.com/google/site-kit-wp/issues/9904).
     129* Refactor consent mode setup CTA to use new infrastructure. See [#9887](https://github.com/google/site-kit-wp/issues/9887).
     130* Update the Audience Segmentation Setup CTA so it does not appear alongside other CTAs. See [#9886](https://github.com/google/site-kit-wp/issues/9886).
     131* Update visitor group card to prevent including `(not set)` in cities with the most visitors. See [#9604](https://github.com/google/site-kit-wp/issues/9604).
    127132
    128133**Changed**
    129134
    130 * Update the service provisioning URL not to contain the `supportemail` query param. See [#10024](https://github.com/google/site-kit-wp/issues/10024).
     135* Ensure user is redirected back to original page when using Sign in with Google. See [#10015](https://github.com/google/site-kit-wp/issues/10015).
    131136
    132137**Fixed**
    133138
    134 * Fix custom dimension metric tiles error when loaded on the KMW widget with the ACR feature flag enabled. See [#9967](https://github.com/google/site-kit-wp/issues/9967).
    135 * Improve redirects when Sign in with Google login fails on WooCommerce pages. See [#9780](https://github.com/google/site-kit-wp/issues/9780).
     139* Improve reliability of Sign in with Google rendering on WooCommerce account pages. See [#10120](https://github.com/google/site-kit-wp/issues/10120).
     140* Fix bug that could cause CTA to add new metrics to Analytics. See [#10044](https://github.com/google/site-kit-wp/issues/10044).
     141* Fix bug that caused the "Top traffic source driving leads" metric to show no data in the "90 days" view. See [#10043](https://github.com/google/site-kit-wp/issues/10043).
     142* Fix bug that could cause metrics not to update properly if answers were changed several times before saving changes. See [#10034](https://github.com/google/site-kit-wp/issues/10034).
     143* Ensure suggested metrics include new events. See [#10033](https://github.com/google/site-kit-wp/issues/10033).
     144* Fix user registration notification dismissal issue on the Sign in with Google settings screen. See [#9933](https://github.com/google/site-kit-wp/issues/9933).
     145* Fix key metrics setup CTA layout at 960px. See [#9911](https://github.com/google/site-kit-wp/issues/9911).
    136146
    137147[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
  • google-site-kit/trunk/dist/manifest.php

    r3229883 r3238118  
    2020    'analytics-advanced-tracking'                          => array( "analytics-advanced-tracking-ea84b2c367b69f5c094b.js", null ),
    2121    'googlesitekit-i18n'                                   => array( "googlesitekit-i18n-33cdd2dee5d1d1f4fb34.js", null ),
    22     'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-0167cbd9e2a4e951c2c2.min.css", null ),
     22    'googlesitekit-admin-css'                              => array( "googlesitekit-admin-css-1a1b3dd6836e74847e00.min.css", null ),
    2323    'googlesitekit-adminbar-css'                           => array( "googlesitekit-adminbar-css-281d66e21d2b87430998.min.css", null ),
    2424    'googlesitekit-authorize-application-css'              => array( "googlesitekit-authorize-application-css-ce25e97404abc5a02921.min.css", null ),
    2525    'googlesitekit-wp-dashboard-css'                       => array( "googlesitekit-wp-dashboard-css-55d9d8bb13cf249a2389.min.css", null ),
    26     'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-0e5fcb2614a2df8b4141.js", null ),
    27     'googlesitekit-runtime'                                => array( "runtime-7900ebf0cb27fa989ac7.js", null ),
    28     'googlesitekit-activation'                             => array( "googlesitekit-activation-0ff4bb4905875a3af96d.js", null ),
    29     'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-1bc5a979d40644f428b9.js", null ),
    30     'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-3eb079e3b867b0628d63.js", null ),
    31     'googlesitekit-api'                                    => array( "googlesitekit-api-56127018cb7e490cef83.js", null ),
    32     'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-cd1b1b91f7b0b537fb1c.js", null ), array( "googlesitekit-components-gm3-8508ed7feed06dfd7cea.js", null ) ),
    33     'googlesitekit-data'                                   => array( "googlesitekit-data-0a0301705fe2a7e3ea13.js", null ),
    34     'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-38cfea41da192d1bc108.js", null ),
    35     'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-2a54fd2f0e87dc2c9475.js", null ),
    36     'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-f7b7542d42fef36c823b.js", null ),
    37     'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-1bf7f3343b392b9d3d36.js", null ),
    38     'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-7de58a4f6164bf6e0b50.js", null ),
    39     'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-41ce7126b0d8da211ca8.js", null ),
    40     'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-4da8f8cf7c833e75c20b.js", null ),
    41     'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-3ee8a23dcaf39401f05a.js", null ),
    42     'googlesitekit-modules'                                => array( "googlesitekit-modules-3149aa67bd387f1e1ecc.js", null ),
    43     'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-eda91d5656699d965a11.js", null ),
    44     'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-60e0039459ccbf52f2dc.js", null ),
    45     'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-e7215bb257eaff98a241.js", null ),
    46     'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-7e61c64f50cba689589c.js", null ),
    47     'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-c83637e628e0caaef7d4.js", null ),
    48     'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-ee6b9d229e6d6c34c65c.js", null ),
    49     'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-ee4e9dd0a0285290e10e.js", null ),
    50     'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-b2f7e90981d1eabf1a0c.js", null ),
    51     'googlesitekit-notifications'                          => array( "googlesitekit-notifications-576ef786c988dd3d308a.js", null ),
    52     'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-37387dc58c34dd8ec319.js", null ),
    53     'googlesitekit-settings'                               => array( "googlesitekit-settings-f0011b69cd7c80cd340a.js", null ),
    54     'googlesitekit-splash'                                 => array( "googlesitekit-splash-0e6568b993910dcbfb85.js", null ),
    55     'googlesitekit-user-input'                             => array( "googlesitekit-user-input-77dfa9da5c9848070722.js", null ),
    56     'googlesitekit-widgets'                                => array( "googlesitekit-widgets-9f86e66067a4d5d6be4f.js", null ),
    57     'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-c774dda1d72e62c09f79.js", null ),
     26    'googlesitekit-vendor'                                 => array( "googlesitekit-vendor-55f6d4109c59b75ef2bd.js", null ),
     27    'googlesitekit-runtime'                                => array( "runtime-cafb5a04ad2af33b7709.js", null ),
     28    'googlesitekit-activation'                             => array( "googlesitekit-activation-859303eb6e15c09c3a50.js", null ),
     29    'googlesitekit-ad-blocking-recovery'                   => array( "googlesitekit-ad-blocking-recovery-ff4f4fe3cc2fc49e0dda.js", null ),
     30    'googlesitekit-adminbar'                               => array( "googlesitekit-adminbar-9ee6cdb0be43ea55ded4.js", null ),
     31    'googlesitekit-api'                                    => array( "googlesitekit-api-9f1616f40adbca43e6b8.js", null ),
     32    'googlesitekit-components'                             => array( array( "googlesitekit-components-gm2-7945eb0cdbd7dc3a89c2.js", null ), array( "googlesitekit-components-gm3-f995cfcb85091ab1e560.js", null ) ),
     33    'googlesitekit-data'                                   => array( "googlesitekit-data-590b288a64d1660dbc11.js", null ),
     34    'googlesitekit-datastore-forms'                        => array( "googlesitekit-datastore-forms-c2f63f0c0adfa5c1bb08.js", null ),
     35    'googlesitekit-datastore-location'                     => array( "googlesitekit-datastore-location-4bd0ca7dbf15fff9fb97.js", null ),
     36    'googlesitekit-datastore-site'                         => array( "googlesitekit-datastore-site-dc7146f24a9f4d40e709.js", null ),
     37    'googlesitekit-datastore-ui'                           => array( "googlesitekit-datastore-ui-7db934d367461124f5b8.js", null ),
     38    'googlesitekit-datastore-user'                         => array( "googlesitekit-datastore-user-1542da3bbef03cd01780.js", null ),
     39    'googlesitekit-entity-dashboard'                       => array( "googlesitekit-entity-dashboard-b0eeab16b25065093d82.js", null ),
     40    'googlesitekit-main-dashboard'                         => array( "googlesitekit-main-dashboard-a4bcd8e2d49c8c193c4e.js", null ),
     41    'googlesitekit-metric-selection'                       => array( "googlesitekit-metric-selection-70ed1134dac53010fa40.js", null ),
     42    'googlesitekit-modules'                                => array( "googlesitekit-modules-1a2ef4f5ec6f6f1b060c.js", null ),
     43    'googlesitekit-modules-ads'                            => array( "googlesitekit-modules-ads-23c0496d89342f02d84d.js", null ),
     44    'googlesitekit-modules-adsense'                        => array( "googlesitekit-modules-adsense-4c9f3e82ede5101a7eec.js", null ),
     45    'googlesitekit-modules-analytics-4'                    => array( "googlesitekit-modules-analytics-4-481b89c2cd44559a7bb4.js", null ),
     46    'googlesitekit-modules-pagespeed-insights'             => array( "googlesitekit-modules-pagespeed-insights-682896da4133e08c66ab.js", null ),
     47    'googlesitekit-modules-reader-revenue-manager'         => array( "googlesitekit-modules-reader-revenue-manager-7ec25dde6792354d0eba.js", null ),
     48    'googlesitekit-modules-search-console'                 => array( "googlesitekit-modules-search-console-1c6864fceeeff7358e12.js", null ),
     49    'googlesitekit-modules-sign-in-with-google'            => array( "googlesitekit-modules-sign-in-with-google-0c7629ea71e0e833b0c2.js", null ),
     50    'googlesitekit-modules-tagmanager'                     => array( "googlesitekit-modules-tagmanager-c8b6022c7b86c9ad9742.js", null ),
     51    'googlesitekit-notifications'                          => array( "googlesitekit-notifications-b81ae6975e8afcf98876.js", null ),
     52    'googlesitekit-polyfills'                              => array( "googlesitekit-polyfills-48e8493ea0e91c0facb6.js", null ),
     53    'googlesitekit-settings'                               => array( "googlesitekit-settings-0c4ffef12bd5de9a413b.js", null ),
     54    'googlesitekit-splash'                                 => array( "googlesitekit-splash-e5aa53e206c5c1ddcc14.js", null ),
     55    'googlesitekit-user-input'                             => array( "googlesitekit-user-input-4af8721f3482ada06493.js", null ),
     56    'googlesitekit-widgets'                                => array( "googlesitekit-widgets-c8a23c2f9e2b270ac4c9.js", null ),
     57    'googlesitekit-wp-dashboard'                           => array( "googlesitekit-wp-dashboard-80711a59677604d769b2.js", null ),
    5858);
  • google-site-kit/trunk/google-site-kit.php

    r3229883 r3238118  
    1212 * Plugin URI:        https://sitekit.withgoogle.com
    1313 * Description:       Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
    14  * Version:           1.145.0
     14 * Version:           1.146.0
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.4
     
    2727
    2828// Define most essential constants.
    29 define( 'GOOGLESITEKIT_VERSION', '1.145.0' );
     29define( 'GOOGLESITEKIT_VERSION', '1.146.0' );
    3030define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );
    3131define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );
  • google-site-kit/trunk/includes/Core/Storage/Post_Meta.php

    r3118692 r3238118  
    1818 * @ignore
    1919 */
    20 final class Post_Meta implements Post_Meta_Interface {
     20final class Post_Meta implements Meta_Interface {
    2121
    2222    /**
  • google-site-kit/trunk/includes/Core/Tags/First_Party_Mode/First_Party_Mode.php

    r3229883 r3238118  
    137137        return array(
    138138            'first_party_mode_is_enabled'               => array(
    139                 'label' => __( 'First-party mode: Enabled', 'google-site-kit' ),
    140                 'value' => $this->health_check_debug_field_value( $settings['isEnabled'] ),
     139                'label' => __( 'First-party mode', 'google-site-kit' ),
     140                'value' => ( true === $settings['isEnabled'] ) ? __( 'Enabled', 'google-site-kit' ) : __( 'Disabled', 'google-site-kit' ),
    141141                'debug' => $this->health_check_debug_field_debug( $settings['isEnabled'] ),
    142142            ),
  • google-site-kit/trunk/includes/Core/Util/Reset.php

    r3118692 r3238118  
    113113        $this->delete_user_options( 'site' );
    114114        $this->delete_post_meta( 'site' );
     115        $this->delete_term_meta( 'site' );
    115116
    116117        if ( $this->context->is_network_mode() ) {
     
    118119            $this->delete_user_options( 'network' );
    119120            $this->delete_post_meta( 'network' );
     121            $this->delete_term_meta( 'network' );
    120122        }
    121123
     
    221223
    222224    /**
     225     * Deletes all Site Kit term meta settings.
     226     *
     227     * @since 1.146.0
     228     *
     229     * @param string $scope Scope of the deletion ('site' or 'network').
     230     */
     231    private function delete_term_meta( $scope ) {
     232        global $wpdb;
     233
     234        $sites = array();
     235        if ( 'network' === $scope ) {
     236            $sites = get_sites(
     237                array(
     238                    'fields' => 'ids',
     239                    'number' => 9999999,
     240                )
     241            );
     242        } else {
     243            $sites[] = get_current_blog_id();
     244        }
     245
     246        foreach ( $sites as $site_id ) {
     247            $prefix = $wpdb->get_blog_prefix( $site_id );
     248
     249            // phpcs:ignore WordPress.DB.DirectDatabaseQuery
     250            $wpdb->query(
     251                $wpdb->prepare(
     252                    "DELETE FROM {$prefix}termmeta WHERE `meta_key` LIKE %s", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     253                    static::KEY_PATTERN
     254                )
     255            );
     256        }
     257    }
     258
     259    /**
    223260     * Gets related REST routes.
    224261     *
  • google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager.php

    r3229883 r3238118  
    3333use Google\Site_Kit\Core\Site_Health\Debug_Data;
    3434use Google\Site_Kit\Core\Storage\Post_Meta;
     35use Google\Site_Kit\Core\Storage\Term_Meta;
    3536use Google\Site_Kit\Core\Tags\Guards\Tag_Environment_Type_Guard;
    3637use Google\Site_Kit\Core\Tags\Guards\Tag_Verify_Guard;
     
    3839use Google\Site_Kit\Core\Util\URL;
    3940use Google\Site_Kit\Modules\Reader_Revenue_Manager\Post_Product_ID;
     41use Google\Site_Kit\Modules\Reader_Revenue_Manager\Term_Product_ID;
    4042use Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings;
    41 use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_OnboardingState;
     43use Google\Site_Kit\Modules\Reader_Revenue_Manager\Synchronize_Publication;
    4244use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Guard;
    4345use Google\Site_Kit\Modules\Reader_Revenue_Manager\Tag_Matchers;
     
    7476        $this->register_scopes_hook();
    7577
    76         $synchronize_onboarding_state = new Synchronize_OnboardingState(
     78        $synchronize_publication = new Synchronize_Publication(
    7779            $this,
    7880            $this->user_options
    7981        );
    80         $synchronize_onboarding_state->register();
     82        $synchronize_publication->register();
    8183
    8284        if ( Feature_Flags::enabled( 'rrmModuleV2' ) && $this->is_connected() ) {
     
    8587            $post_product_id = new Post_Product_ID( $post_meta, $publication_id );
    8688            $post_product_id->register();
    87         }
    88 
    89         add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
    90         add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_onboarding_state, 'maybe_schedule_synchronize_onboarding_state' ) );
     89
     90            $term_meta       = new Term_Meta();
     91            $term_product_id = new Term_Product_ID( $term_meta, $publication_id );
     92            $term_product_id->register();
     93        }
     94
     95        add_action( 'load-toplevel_page_googlesitekit-dashboard', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
     96        add_action( 'load-toplevel_page_googlesitekit-settings', array( $synchronize_publication, 'maybe_schedule_synchronize_publication' ) );
    9197
    9298        // Reader Revenue Manager tag placement logic.
  • google-site-kit/trunk/includes/Modules/Reader_Revenue_Manager/Post_Product_ID.php

    r3229883 r3238118  
    1212
    1313use Google\Site_Kit\Core\Storage\Post_Meta;
    14 use Google\Site_Kit\Core\Storage\Post_Meta_Setting;
     14use Google\Site_Kit\Core\Storage\Meta_Setting_Trait;
    1515
    1616/**
     
    2121 * @ignore
    2222 */
    23 class Post_Product_ID extends Post_Meta_Setting {
     23class Post_Product_ID {
     24
     25    use Meta_Setting_Trait;
     26
    2427    /**
    2528     * Publication ID.
     
    4043     */
    4144    public function __construct( Post_Meta $post_meta, string $publication_id ) {
    42         parent::__construct( $post_meta );
    43 
     45        $this->meta           = $post_meta;
    4446        $this->publication_id = $publication_id;
    4547    }
     
    5759
    5860    /**
     61     * Returns the object type.
     62     *
     63     * @since 1.146.0
     64     *
     65     * @return string Object type.
     66     */
     67    protected function get_object_type(): string {
     68        return 'post';
     69    }
     70
     71    /**
    5972     * Gets the `show_in_rest` value for this postmeta setting value.
    6073     *
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google.php

    r3229883 r3238118  
    8282
    8383    /**
     84     * WooCommerce instance.
     85     *
     86     * @since 1.146.0
     87     * @var WooCommerce
     88     */
     89    protected $woocommerce;
     90
     91    /**
    8492     * Constructor.
    8593     *
     
    101109        parent::__construct( $context, $options, $user_options, $authentication, $assets );
    102110        $this->existing_client_id = new Existing_Client_ID( $this->options );
     111        $this->woocommerce        = new WooCommerce( $this->context );
    103112    }
    104113
     
    112121        add_filter( 'wp_login_errors', array( $this, 'handle_login_errors' ) );
    113122
    114         add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_existing_client_id' ), 10 );
     123        add_filter( 'googlesitekit_inline_modules_data', $this->get_method_proxy( 'inline_module_data' ), 10 );
    115124
    116125        add_action(
     
    309318
    310319    /**
    311      * Renders the Sign in with Google JS script tags, One-tap code, and
     320     * Renders the Sign in with Google JS script tags, One Tap code, and
    312321     * buttons.
    313322     *
     
    329338
    330339        // If this is not the WordPress or WooCommerce login page, check to
    331         // see if "One-tap enabled on all pages" is set first. If it isnt:
     340        // see if "One Tap enabled on all pages" is set first. If it isnt:
    332341        // don't render the Sign in with Google JS.
    333342        if ( ! $is_wp_login && ! $is_woocommerce_login && ! $settings['oneTapOnAllPages'] ) {
     
    353362        // Whether buttons will be rendered/transformed on this page.
    354363        $render_buttons = $is_wp_login || $is_woocommerce_login;
     364        $render_one_tap = ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() );
     365
     366        // If we aren't rendering buttons or One-tap, return early.
     367        if ( ! $render_buttons && ! $render_one_tap ) {
     368            return;
     369        }
     370
     371        // Set the cookie time to live to 5 minutes. If the redirect_to is empty,
     372        // set the cookie to expire immediately.
     373        $cookie_expire_time = 300000;
     374        if ( empty( $redirect_to ) ) {
     375            $cookie_expire_time *= -1;
     376        }
    355377
    356378        // Render the Sign in with Google script.
     
    369391                body: new URLSearchParams( response )
    370392            } );
    371             if ( res.ok && res.redirected ) {
    372                 location.assign( res.url );
    373             }
     393
     394            <?php if ( empty( $redirect_to ) && ! $render_buttons && $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     395                location.reload();
     396            <?php else : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     397                if ( res.ok && res.redirected ) {
     398                    location.assign( res.url );
     399                }
     400            <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    374401        } catch( error ) {
    375402            console.error( error );
     
    391418
    392419        <?php if ( $is_woocommerce_login ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    393             for ( const login of document.getElementsByClassName( 'login' ) ) {
    394                 login.insertBefore( parent, login.firstChild );
     420            parent.classList.add( 'woocommerce-form-row', 'form-row' );
     421            const form = document.querySelector( '.woocommerce-form.login' );
     422            if ( form ) {
     423                form.insertBefore( parent, form.firstChild );
    395424            }
    396425        <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    397426
    398427        google.accounts.id.renderButton( parent, <?php echo wp_json_encode( $btn_args ); ?> );
    399 
    400         <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    401             const expires = new Date();
    402             expires.setTime( expires.getTime() + 300000 );<?php // 5 minutes ?>
    403             document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires="  + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    404         <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    405428    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    406429
    407     <?php if ( ! empty( $settings['oneTapEnabled'] ) && ( $is_wp_login || ! is_user_logged_in() ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     430    <?php if ( $render_one_tap ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    408431        google.accounts.id.prompt();
     432    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     433
     434    <?php if ( ! empty( $redirect_to ) ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
     435        const expires = new Date();
     436        expires.setTime( expires.getTime() + <?php echo esc_js( $cookie_expire_time ); ?> );
     437        document.cookie = "<?php echo esc_js( Authenticator::COOKIE_REDIRECT_TO ); ?>=<?php echo esc_js( $redirect_to ); ?>;expires=" + expires.toUTCString() + ";path=<?php echo esc_js( Authenticator::get_cookie_path() ); ?>";
    409438    <?php endif; // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
    410439} )();
     
    480509            'sign_in_with_google_use_snippet'              => array(
    481510                /* translators: %s: Sign in with Google service name */
    482                 'label' => sprintf( __( '%s: One-tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
     511                'label' => sprintf( __( '%s: One Tap Enabled', 'google-site-kit' ), _x( 'Sign in with Google', 'Service name', 'google-site-kit' ) ),
    483512                'value' => $settings['oneTapEnabled'] ? __( 'Yes', 'google-site-kit' ) : __( 'No', 'google-site-kit' ),
    484513                'debug' => $settings['oneTapEnabled'] ? 'yes' : 'no',
     
    530559        $wp_login_url = wp_login_url();
    531560
    532         $woo_commerce = new WooCommerce( $this->context );
    533         if ( $woo_commerce->is_active() ) {
     561        if ( $this->woocommerce->is_active() ) {
    534562            $wc_login_page_id = wc_get_page_id( 'myaccount' );
    535563            $wc_login_url     = get_permalink( $wc_login_page_id );
     
    670698
    671699    /**
    672      * Exposes an existing client ID from a previous connection
    673      * to JS via _googlesitekitModulesData.
     700     * Exposes inline module data to JS via _googlesitekitModulesData.
    674701     *
    675702     * @since 1.142.0
     703     * @since 1.146.0 Added isWooCommerceActive and isWooCommerceRegistrationEnabled to the inline data.
    676704     *
    677705     * @param array $modules_data Inline modules data.
    678706     * @return array Inline modules data.
    679707     */
    680     protected function inline_existing_client_id( $modules_data ) {
     708    protected function inline_module_data( $modules_data ) {
     709        $inline_data = array();
     710
    681711        $existing_client_id = $this->existing_client_id->get();
    682 
    683712        if ( $existing_client_id ) {
    684             // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
    685             $modules_data['sign-in-with-google'] = array(
    686                 'existingClientID' => $existing_client_id,
    687             );
    688         }
     713            $inline_data['existingClientID'] = $existing_client_id;
     714        }
     715
     716        $is_woocommerce_active            = $this->woocommerce->is_active();
     717        $woocommerce_registration_enabled = $is_woocommerce_active ? get_option( 'woocommerce_enable_myaccount_registration' ) : null;
     718
     719        $inline_data['isWooCommerceActive']              = $is_woocommerce_active;
     720        $inline_data['isWooCommerceRegistrationEnabled'] = $is_woocommerce_active && 'yes' === $woocommerce_registration_enabled;
     721
     722        // Add the data under the `sign-in-with-google` key to make it clear it's scoped to this module.
     723        $modules_data['sign-in-with-google'] = $inline_data;
    689724
    690725        return $modules_data;
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google/Authenticator.php

    r3229883 r3238118  
    134134
    135135        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
    136         $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     136        $cookie_redirect_to = $this->get_cookie_redirect( $input );
    137137        if ( ! empty( $cookie_redirect_to ) ) {
    138138            $redirect_to = $cookie_redirect_to;
    139 
    140             if ( ! headers_sent() ) {
    141                 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
    142                 setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
    143             }
    144139        }
    145140
     
    335330        return dirname( wp_parse_url( wp_login_url(), PHP_URL_PATH ) );
    336331    }
     332
     333    /**
     334     * Gets the redirect URL from the cookie and clears the cookie.
     335     *
     336     * @since 1.146.0
     337     *
     338     * @param Input $input Input instance.
     339     * @return string Redirect URL.
     340     */
     341    protected function get_cookie_redirect( $input ) {
     342        $cookie_redirect_to = $input->filter( INPUT_COOKIE, self::COOKIE_REDIRECT_TO );
     343        if ( ! empty( $cookie_redirect_to ) && ! headers_sent() ) {
     344            // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
     345            setcookie( self::COOKIE_REDIRECT_TO, '', time() - 3600, self::get_cookie_path(), COOKIE_DOMAIN );
     346        }
     347
     348        return $cookie_redirect_to;
     349    }
    337350}
  • google-site-kit/trunk/includes/Modules/Sign_In_With_Google/WooCommerce_Authenticator.php

    r3229883 r3238118  
    4343     *
    4444     * @since 1.145.0
     45     * @since 1.146.0 Updated to take into account redirect URL from cookie.
    4546     *
    4647     * @param WP_User $user User object.
     
    4950     */
    5051    protected function get_redirect_url( $user, $input ) {
    51         $redirect = wc_get_page_permalink( 'myaccount' );
    52         return apply_filters( 'woocommerce_login_redirect', $redirect, $user );
     52        $redirect_to = wc_get_page_permalink( 'myaccount' );
     53
     54        // If we have the redirect URL in the cookie, use it as the main redirect_to URL.
     55        $cookie_redirect_to = $this->get_cookie_redirect( $input );
     56        if ( ! empty( $cookie_redirect_to ) ) {
     57            $redirect_to = $cookie_redirect_to;
     58        }
     59
     60        return apply_filters( 'woocommerce_login_redirect', $redirect_to, $user );
    5361    }
    5462}
  • google-site-kit/trunk/includes/vendor/composer/autoload_classmap.php

    r3229883 r3238118  
    158158    'Google\\Site_Kit\\Core\\Storage\\Encrypted_Options' => $baseDir . '/Core/Storage/Encrypted_Options.php',
    159159    'Google\\Site_Kit\\Core\\Storage\\Encrypted_User_Options' => $baseDir . '/Core/Storage/Encrypted_User_Options.php',
     160    'Google\\Site_Kit\\Core\\Storage\\Meta_Interface' => $baseDir . '/Core/Storage/Meta_Interface.php',
     161    'Google\\Site_Kit\\Core\\Storage\\Meta_Setting_Trait' => $baseDir . '/Core/Storage/Meta_Setting_Trait.php',
    160162    'Google\\Site_Kit\\Core\\Storage\\Options' => $baseDir . '/Core/Storage/Options.php',
    161163    'Google\\Site_Kit\\Core\\Storage\\Options_Interface' => $baseDir . '/Core/Storage/Options_Interface.php',
    162164    'Google\\Site_Kit\\Core\\Storage\\Post_Meta' => $baseDir . '/Core/Storage/Post_Meta.php',
    163     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Interface' => $baseDir . '/Core/Storage/Post_Meta_Interface.php',
    164     'Google\\Site_Kit\\Core\\Storage\\Post_Meta_Setting' => $baseDir . '/Core/Storage/Post_Meta_Setting.php',
    165165    'Google\\Site_Kit\\Core\\Storage\\Setting' => $baseDir . '/Core/Storage/Setting.php',
    166166    'Google\\Site_Kit\\Core\\Storage\\Setting\\List_Setting' => $baseDir . '/Core/Storage/Setting/List_Setting.php',
     
    169169    'Google\\Site_Kit\\Core\\Storage\\Setting_With_Owned_Keys_Trait' => $baseDir . '/Core/Storage/Setting_With_Owned_Keys_Trait.php',
    170170    'Google\\Site_Kit\\Core\\Storage\\Setting_With_ViewOnly_Keys_Interface' => $baseDir . '/Core/Storage/Setting_With_ViewOnly_Keys_Interface.php',
     171    'Google\\Site_Kit\\Core\\Storage\\Term_Meta' => $baseDir . '/Core/Storage/Term_Meta.php',
    171172    'Google\\Site_Kit\\Core\\Storage\\Transients' => $baseDir . '/Core/Storage/Transients.php',
    172173    'Google\\Site_Kit\\Core\\Storage\\User_Aware_Interface' => $baseDir . '/Core/Storage/User_Aware_Interface.php',
     
    310311    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Post_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Post_Product_ID.php',
    311312    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Settings' => $baseDir . '/Modules/Reader_Revenue_Manager/Settings.php',
    312     'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_OnboardingState' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_OnboardingState.php',
     313    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Synchronize_Publication' => $baseDir . '/Modules/Reader_Revenue_Manager/Synchronize_Publication.php',
    313314    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Guard' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Guard.php',
    314315    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Tag_Matchers' => $baseDir . '/Modules/Reader_Revenue_Manager/Tag_Matchers.php',
     316    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Term_Product_ID' => $baseDir . '/Modules/Reader_Revenue_Manager/Term_Product_ID.php',
    315317    'Google\\Site_Kit\\Modules\\Reader_Revenue_Manager\\Web_Tag' => $baseDir . '/Modules/Reader_Revenue_Manager/Web_Tag.php',
    316318    'Google\\Site_Kit\\Modules\\Search_Console' => $baseDir . '/Modules/Search_Console.php',
  • google-site-kit/trunk/readme.txt

    r3229883 r3238118  
    55Tested up to:      6.7
    66Requires PHP:      7.4
    7 Stable tag:        1.145.0
     7Stable tag:        1.146.0
    88License:           Apache License 2.0
    99License URI:       https://www.apache.org/licenses/LICENSE-2.0
     
    110110== Changelog ==
    111111
    112 = 1.145.0 =
     112= 1.146.0 =
    113113
    114114**Enhanced**
    115115
    116 * Add Site Health information for Reader Revenue Manager expansions. See [#9974](https://github.com/google/site-kit-wp/issues/9974).
    117 * Add an empty RRM V2 JavaScript entry point for the WordPress block editor, with functionality to be added in subsequent issues. See [#9957](https://github.com/google/site-kit-wp/issues/9957).
    118 * Add mechanism to store post-level Reader Revenue Manager settings. See [#9955](https://github.com/google/site-kit-wp/issues/9955).
    119 * Update Reader Revenue Manager module settings infrastructure. See [#9951](https://github.com/google/site-kit-wp/issues/9951).
    120 * Add a trigger for a survey when the user sees the FPM setup banner, and one when the user enables FPM, in order to help track usage of the feature. See [#9940](https://github.com/google/site-kit-wp/issues/9940).
    121 * Update copy on disconnect module modal. See [#9935](https://github.com/google/site-kit-wp/issues/9935).
    122 * Standardize the capitalization of "First-party mode" across the plugin for consistency. See [#9902](https://github.com/google/site-kit-wp/issues/9902).
    123 * Ensure the Reader Revenue Manager Setup CTA does not appear alongside other CTAs. See [#9889](https://github.com/google/site-kit-wp/issues/9889).
    124 * Add error handling to the First-party mode setup banner to display errors and prevent premature dismissal when saving settings fail. See [#9846](https://github.com/google/site-kit-wp/issues/9846).
    125 * Update auth error notification to use new notifications infrastructure. See [#9284](https://github.com/google/site-kit-wp/issues/9284).
    126 * Update tooltip tours to display on smaller screen sizes. See [#3003](https://github.com/google/site-kit-wp/issues/3003).
     116* Add warning to users when Sign in with Google One-tap appears site-wide without open user registrations. See [#10079](https://github.com/google/site-kit-wp/issues/10079).
     117* Update the Reader Revenue Manager settings view screen to include new settings introduced in Phase 2. See [#10067](https://github.com/google/site-kit-wp/issues/10067).
     118* Add a reusable chip multi-select component. See [#10064](https://github.com/google/site-kit-wp/issues/10064).
     119* Update the Reader Revenue Manager setup CTA banner copy to highlight paywall support when the feature flag is enabled. See [#10063](https://github.com/google/site-kit-wp/issues/10063).
     120* Add mechanism to clear term meta on Site Kit reset. See [#10061](https://github.com/google/site-kit-wp/issues/10061).
     121* Add mechanism to store term-level Reader Revenue Manager settings. See [#9956](https://github.com/google/site-kit-wp/issues/9956).
     122* Add mechanism to synchronize Reader Revenue Manager publication information. See [#9954](https://github.com/google/site-kit-wp/issues/9954).
     123* Add mechanism to reset publication-specific information when the publication is changed. See [#9953](https://github.com/google/site-kit-wp/issues/9953).
     124* Update Reader Revenue Manager publication selection to populate new settings. See [#9952](https://github.com/google/site-kit-wp/issues/9952).
     125* Add infrastructure to interface with WordPress term metadata. See [#9949](https://github.com/google/site-kit-wp/issues/9949).
     126* Improve the styling of the Sign in with Google button on WooCommerce login forms. See [#9932](https://github.com/google/site-kit-wp/issues/9932).
     127* Update Ads settings view screen to display items in the correct order. See [#9908](https://github.com/google/site-kit-wp/issues/9908).
     128* Update the First-party mode status in Site Health to use "Enabled" or "Disabled" instead of "Yes" or "No" and update the label from "First-party mode: Enabled" to "First-party mode". See [#9904](https://github.com/google/site-kit-wp/issues/9904).
     129* Refactor consent mode setup CTA to use new infrastructure. See [#9887](https://github.com/google/site-kit-wp/issues/9887).
     130* Update the Audience Segmentation Setup CTA so it does not appear alongside other CTAs. See [#9886](https://github.com/google/site-kit-wp/issues/9886).
     131* Update visitor group card to prevent including `(not set)` in cities with the most visitors. See [#9604](https://github.com/google/site-kit-wp/issues/9604).
    127132
    128133**Changed**
    129134
    130 * Update the service provisioning URL not to contain the `supportemail` query param. See [#10024](https://github.com/google/site-kit-wp/issues/10024).
     135* Ensure user is redirected back to original page when using Sign in with Google. See [#10015](https://github.com/google/site-kit-wp/issues/10015).
    131136
    132137**Fixed**
    133138
    134 * Fix custom dimension metric tiles error when loaded on the KMW widget with the ACR feature flag enabled. See [#9967](https://github.com/google/site-kit-wp/issues/9967).
    135 * Improve redirects when Sign in with Google login fails on WooCommerce pages. See [#9780](https://github.com/google/site-kit-wp/issues/9780).
     139* Improve reliability of Sign in with Google rendering on WooCommerce account pages. See [#10120](https://github.com/google/site-kit-wp/issues/10120).
     140* Fix bug that could cause CTA to add new metrics to Analytics. See [#10044](https://github.com/google/site-kit-wp/issues/10044).
     141* Fix bug that caused the "Top traffic source driving leads" metric to show no data in the "90 days" view. See [#10043](https://github.com/google/site-kit-wp/issues/10043).
     142* Fix bug that could cause metrics not to update properly if answers were changed several times before saving changes. See [#10034](https://github.com/google/site-kit-wp/issues/10034).
     143* Ensure suggested metrics include new events. See [#10033](https://github.com/google/site-kit-wp/issues/10033).
     144* Fix user registration notification dismissal issue on the Sign in with Google settings screen. See [#9933](https://github.com/google/site-kit-wp/issues/9933).
     145* Fix key metrics setup CTA layout at 960px. See [#9911](https://github.com/google/site-kit-wp/issues/9911).
    136146
    137147[See changelog for all versions](https://raw.githubusercontent.com/google/site-kit-wp/main/changelog.txt).
Note: See TracChangeset for help on using the changeset viewer.