Plugin Directory

Changeset 3745447


Ignore:
Timestamp:
10/14/2026 06:15:46 AM (4 weeks ago)
Author:
tracksies
Message:

Tag 1.1.29

Location:
trustie/tags/1.1.29
Files:
2 added
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trustie/tags/1.1.29/assets/css/reviews.css

    r3677489 r3745447  
    719719        position: fixed;
    720720        z-index: 99999;
    721         font-family: var(--trustie-font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
     721        /* The page's own font when Brand Hub has none to give. A system-font
     722           fallback here showed Noble Ink signed-in visitors the wrong font
     723           whenever Brand Hub wrote --tracksies-font-body: inherit (14 Oct 2026). */
     724        font-family: var(--trustie-font-body, inherit);
    722725}
    723726
  • trustie/tags/1.1.29/includes/class-trustie-display.php

    r3677489 r3745447  
    354354
    355355                $this->enqueue_styles();
     356
     357                // Email links and the stars point at #reviews, inside this tab.
     358                if ( function_exists( 'trustie_free_enqueue_review_anchor_script' ) ) {
     359                        trustie_free_enqueue_review_anchor_script();
     360                }
    356361
    357362                $reviews = $this->get_product_reviews( $product->get_id(), array(
    … …  
    17031708                }
    17041709
     1710                // Links to #reviews reach this form's section - see review-anchor.js.
     1711                if ( function_exists( 'trustie_free_enqueue_review_anchor_script' ) ) {
     1712                        trustie_free_enqueue_review_anchor_script();
     1713                }
     1714
    17051715                // Allow Pro to provide a custom form (form builder, UGC uploads, etc.).
    17061716                // Form HTML is built internally by render_frontend_form() with proper escaping.
  • trustie/tags/1.1.29/includes/class-trustie-requests.php

    r3737502 r3745447  
    734734                }
    735735
     736                // Proof of purchase for the Verified badge: the link came from this
     737                // order (trustie-review-link.php). Never a login.
     738                if ( function_exists( 'trustie_free_set_review_link_cookie' ) ) {
     739                        trustie_free_set_review_link_cookie( $order_id, $email );
     740                }
     741
    736742                // Get the product.
    737743                $product = wc_get_product( $product_id );
    … …  
    740746                }
    741747
    742                 // Straight to the review form, for everyone. Never log anyone in from
     748                // Straight to the reviews, for everyone. Never log anyone in from
    743749                // this link: it does not expire, can be used again, and reaches whoever
    744750                // holds the email, so signing in from it handed the account - a shop
    745751                // owner's included - to anyone the email was forwarded to. And guests
    746752                // are not sent away to log in, because the form takes guest reviews.
    747                 wp_safe_redirect( get_permalink( $product_id ) . '#respond' );
     753                // #reviews, where the stars link too (Sarah, 14 Oct 2026: "just point it
     754                // at #reviews"). review-anchor.js opens the tab it sits in.
     755                wp_safe_redirect( get_permalink( $product_id ) . '#reviews' );
    748756                exit;
    749757        }
  • trustie/tags/1.1.29/includes/shared/assets/js/tracksies-nonce-refresh.js

    r3677489 r3745447  
    4949
    5050                var url = cfg.endpoint + ( cfg.endpoint.indexOf( '?' ) === -1 ? '?' : '&' ) +
    51                         'action=' + encodeURIComponent( action );
     51                        'action=' + encodeURIComponent( action ) +
     52                        // A URL no cache has seen. Page and REST caches (LiteSpeed's, at
     53                        // least) key on the URL and ignore no-store, and a cached answer
     54                        // hands everyone one stored nonce.
     55                        '&_tn=' + Date.now().toString( 36 ) + Math.random().toString( 36 ).slice( 2, 8 );
     56
     57                var headers = { Accept: 'application/json' };
     58                // Signed in: without this WordPress runs the request as a logged-out
     59                // visitor and hands back a nonce that fails for this session (403).
     60                if ( cfg.restNonce ) {
     61                        headers[ 'X-WP-Nonce' ] = cfg.restNonce;
     62                }
    5263
    5364                inflight[ action ] = fetch( url, {
    5465                        credentials: 'same-origin',
    55                         headers: { Accept: 'application/json' },
     66                        headers: headers,
    5667                        cache: 'no-store'
    5768                } )
  • trustie/tags/1.1.29/includes/shared/class-tracksies-nonce-refresh.php

    r3677489 r3745447  
    3030        return;
    3131}
    32 define( 'TRACKSIES_NONCE_REFRESH_VERSION', '1.0.0' );
     32define( 'TRACKSIES_NONCE_REFRESH_VERSION', '1.0.2' );
    3333
    3434/**
    … …  
    220220                // visitor the same stale token the page already had.
    221221                nocache_headers();
     222                // LiteSpeed's REST cache ignores the headers above (Noble Ink, 14 Oct
     223                // 2026: X-LiteSpeed-Cache: hit on this URL) and handed every visitor,
     224                // signed in or not, one stored logged-out nonce. Tell it directly.
     225                do_action( 'litespeed_control_set_nocache', 'Tracksies nonce refresh' );
    222226
    223227                $response = rest_ensure_response(
    … …  
    227231                );
    228232                $response->header( 'Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0' );
     233                $response->header( 'X-LiteSpeed-Cache-Control', 'no-cache' );
    229234
    230235                return $response;
    … …  
    252257                        'tracksiesNonceRefresh',
    253258                        array(
    254                                 'endpoint' => rest_url( self::REST_NAMESPACE . '/nonce' ),
    255                                 'actions'  => $actions,
    256                                 'globals'  => (object) $this->get_refreshable_globals(),
     259                                'endpoint'  => rest_url( self::REST_NAMESPACE . '/nonce' ),
     260                                'actions'   => $actions,
     261                                'globals'   => (object) $this->get_refreshable_globals(),
     262                                // A REST request carrying the login cookie but no X-WP-Nonce
     263                                // is run as a logged-OUT visitor (core rest_cookie_check_errors),
     264                                // so without this the endpoint minted a logged-out nonce and the
     265                                // script swapped it over the page's good one: every Trustie AJAX
     266                                // call a signed-in customer made after their first click got 403
     267                                // (found on a live store, 14 Oct 2026). Only signed-in pages need
     268                                // it, and those are never served from a shared page cache.
     269                                'restNonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : '',
    257270                        )
    258271                );
  • trustie/tags/1.1.29/readme.txt

    r3737502 r3745447  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.28
     7Stable tag: 1.1.29
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    280280
    281281== Changelog ==
     282
     283= 1.1.29 =
     284* Reviews page and testimonial form fixed for signed-in customers.
     285* Floating reviews tab and panel font fixed.
     286* Verified badge fixed. A new review is verified when the reviewer is signed in and bought the product, or came from that order's review request email.
     287* Review email buttons, and the star rating on a product page, open the product's reviews, even when the Reviews tab starts closed.
    282288
    283289= 1.1.28 =
    … …  
    431437== Upgrade Notice ==
    432438
     439= 1.1.29 =
     440Fixes for the reviews page, the testimonial form, review email links and the Verified badge.
     441
    433442= 1.1.28 =
    434443A security fix for the links in review request emails. Please update.
  • trustie/tags/1.1.29/trustie.php

    r3737502 r3745447  
    44 * Plugin URI: https://docs.tracksies.com/docs/trustie-free/
    55 * Description: Reviews, testimonials, and Google reviews for WordPress. Display star ratings, collect testimonials, show Google Business reviews, and add a floating reviews widget, with or without WooCommerce.
    6  * Version: 1.1.28
     6 * Version: 1.1.29
    77 * Author: Tracksies
    88 * Author URI: https://tracksies.com
    … …  
    4040 */
    4141if ( ! defined( 'TRUSTIE_VERSION' ) ) {
    42         define( 'TRUSTIE_VERSION', '1.1.28' );
     42        define( 'TRUSTIE_VERSION', '1.1.29' );
    4343}
    4444if ( ! defined( 'TRUSTIE_PLUGIN_FILE' ) ) {
    … …  
    9494tracksies_register_shared( 'schema',          '1.0.0', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-trustie-schema.php' );
    9595tracksies_register_shared( 'helpers',         '1.0.1', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-helpers.php' );
    96 tracksies_register_shared( 'nonce-refresh', '1.0.0', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-nonce-refresh.php' );
     96tracksies_register_shared( 'nonce-refresh', '1.0.2', TRUSTIE_PLUGIN_DIR . 'includes/shared/class-tracksies-nonce-refresh.php' );
    9797
    9898// Nonces baked into cached HTML expire long before the cache does, so every
    … …  
    129129// Loaded at file-load time so action hooks are registered before the features class fires them.
    130130require_once TRUSTIE_PLUGIN_DIR . 'includes/trustie-free-features.php';
     131
     132// Who gets the Verified badge, and where review email links land.
     133require_once TRUSTIE_PLUGIN_DIR . 'includes/trustie-review-link.php';
    131134
    132135/**
Note: See TracChangeset for help on using the changeset viewer.