Plugin Directory

Changeset 3488517


Ignore:
Timestamp:
03/23/2026 02:09:53 AM (4 days ago)
Author:
ivole
Message:

5.103.0

Location:
customer-reviews-woocommerce
Files:
872 added
5 edited

Legend:

Unmodified
Added
Removed
  • customer-reviews-woocommerce/trunk/class-ivole.php

    r3472287 r3488517  
    8686
    8787class Ivole {
    88     const CR_VERSION = '5.102.0';
     88    const CR_VERSION = '5.103.0';
    8989
    9090    public function __construct() {
  • customer-reviews-woocommerce/trunk/includes/reminders/class-cr-manual.php

    r3451657 r3488517  
    6565                    ) ||
    6666                    (
    67                         'yes' !== $verified_reviews &&
    68                         'no' !== $consent
     67                        'yes' !== $verified_reviews
    6968                    )
    7069                ) {
     
    284283                    }
    285284                    //count reviews that an order has received
     285                    $order_id = $order->get_id();
    286286                    $args = array(
    287287                        'count' => true,
    288                         'meta_key' => array( 'ivole_order', 'ivole_order_locl' ),
    289                         'meta_value' => $order->get_id()
     288                        'type' => 'review',
     289                        'meta_query' => array(
     290                            'relation' => 'OR',
     291                            array(
     292                                'key'   => 'ivole_order',
     293                                'value' => $order_id
     294                            ),
     295                            array(
     296                                'key'   => 'ivole_order_locl',
     297                                'value' => $order_id
     298                            ),
     299                            array(
     300                                'key'   => 'ivole_order_priv',
     301                                'value' => $order_id
     302                            ),
     303                            array(
     304                                'key'   => 'ivole_order_unve',
     305                                'value' => $order_id
     306                            )
     307                        )
    290308                    );
    291309                    $reviews_count = get_comments( $args );
     
    313331                                }
    314332                            } else {
    315                                 echo __( 'Automatic review reminders are disabled', 'customer-reviews-woocommerce' );
     333                                echo __( 'Automatic review reminders are disabled', 'customer-reviews-woocommerce' ) . $reviews_text;
    316334                            }
    317335                        } else {
     
    326344                                    }
    327345                                } else {
    328                                     echo __( 'Automatic review reminders are disabled', 'customer-reviews-woocommerce' );
     346                                    echo __( 'Automatic review reminders are disabled', 'customer-reviews-woocommerce' ) . $reviews_text;
    329347                                }
    330348                            } else {
  • customer-reviews-woocommerce/trunk/ivole.php

    r3472287 r3488517  
    44Description: Customer Reviews for WooCommerce plugin helps you get more customer reviews for your shop by sending automated reminders and coupons.
    55Plugin URI: https://wordpress.org/plugins/customer-reviews-woocommerce/
    6 Version: 5.102.0
     6Version: 5.103.0
    77Author: CusRev
    88Author URI: https://www.cusrev.com/business/
     
    1111Requires at least: 4.5
    1212WC requires at least: 3.6
    13 WC tested up to: 10.5
     13WC tested up to: 10.6
    1414License: GPLv3
    1515
  • customer-reviews-woocommerce/trunk/js/form.js

    r3451657 r3488517  
    294294            crSendClickEvent(productId, formId);
    295295        } );
     296
     297        crPrePopulateRatings();
    296298    } );
    297299
     
    315317    }
    316318
     319    // Function to get all GET parameters as an object
     320    function crGetQueryParams() {
     321        var params = {};
     322        window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(_, key, value) {
     323            params[key] = decodeURIComponent(value);
     324        });
     325        return params;
     326    }
     327
     328    // Pre-populate ratings
     329    function crPrePopulateRatings() {
     330        var params = crGetQueryParams();
     331
     332        // Loop through keys like rating-0, rating-1, ...
     333        jQuery.each(params, function(key, value) {
     334            if (key.startsWith("rating-")) {
     335                var index = parseInt(key.split("-")[1], 10);
     336                var itemId = index + 1; // rating-0 -> data-itemid=1, rating-1 -> data-itemid=2
     337
     338                // Only target items with data-itemid > 0 (products)
     339                var $item = jQuery(".cr-form-item[data-itemid='" + itemId + "']");
     340                if ($item.length && itemId > 0) {
     341                    var rating = parseInt(value, 10);
     342
     343                    // Ensure rating is between 1 and 5
     344                    if (rating >= 1 && rating <= 5) {
     345                        $item.find( ".cr-form-item-rating-radio .cr-form-item-inner" ).removeClass( "cr-form-active-radio" );
     346                        $item.find( ".cr-form-item-rating-radio .cr-form-item-inner[data-rating='" + rating + "']" ).addClass( "cr-form-active-radio" );
     347                        $item.find( ".cr-form-item-question" ).removeClass( "cr-form-error" );
     348                    }
     349                }
     350            }
     351        });
     352    }
     353
    317354} )();
  • customer-reviews-woocommerce/trunk/readme.txt

    r3472287 r3488517  
    55Tested up to: 6.9
    66Requires PHP: 7.2
    7 Stable tag: 5.102.0
     7Stable tag: 5.103.0
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl.html
     
    235235== Changelog ==
    236236
     237= 5.103.0 =
     238* Bug fix: incorrect count of reviews on WooCommerce Orders page in certain scenarios
    237239= 5.102.0 =
    238240* Bug fix: discount tiers didn't take into account the number of uploaded files for onsite reviews
Note: See TracChangeset for help on using the changeset viewer.