Plugin Directory

Changeset 3103906


Ignore:
Timestamp:
06/18/2024 07:22:08 AM (22 months ago)
Author:
avisverifies
Message:

Version 2.4.1 / 12/06/2024

  • Fix : getting orders when HPOS is activated
Location:
netreviews/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • netreviews/trunk/api_functions.php

    r3054488 r3103906  
    941941    $query_flag = "UPDATE " . $table_prefix . "postmeta SET meta_value = '1' WHERE meta_key = 'av_flag' AND post_id IN (" . $where . ")";
    942942    $query_date = "UPDATE " . $table_prefix . "postmeta SET meta_value = '" . $time . "' WHERE meta_key = 'av_horodate' AND post_id IN (" . $where . ")";
    943 
    944943    $wpdb->query($query_flag);
    945944    $wpdb->query($query_date);
     945    $wcVersion = ntav_getConfig('WCVERSION');
     946    if($wcVersion >= 8.2){
     947        $query_meta = "UPDATE " . $table_prefix . "wc_orders_meta SET meta_value = '1' WHERE meta_key = 'av_flag' AND order_id IN (" . $where . ")";
     948        $wpdb->query($query_meta);
     949    }
    946950}
    947951
  • netreviews/trunk/changelog.txt

    r3054488 r3103906  
     1Version 2.4.1 / 12/06/2024
     2- Fix : getting orders when HPOS is activated
     3
    14Version 2.4.0 / 18/03/2024
    25- Addition new route getProductReviewsStats
  • netreviews/trunk/functions.php

    r3054488 r3103906  
    66function ntav_update_version_plugin()
    77{
    8     ntav_updateValue('MODVERSION', '2.4.0');
     8    ntav_updateValue('MODVERSION', '2.4.1');
    99}
    1010
  • netreviews/trunk/netreviews.php

    r3054488 r3103906  
    66 * Description: We provide you with a solution that enables you to collect customer reviews about your website and products which will show on your
    77 * website and on a attestation which will increase the credibility of published reviews.
    8  * Version: 2.4.0
     8 * Version: 2.4.1
    99 * Author: NetReviews SAS <contact@avis-verifies.com>
    1010 * Author URI: www.avis-verifies.com
     
    697697function ntav_av_new_order($id)
    698698{
     699    global $wpdb;
    699700    $flag_mark = get_post_meta($id, 'av_flag', true);
    700701    if (!is_numeric($flag_mark) && $flag_mark != 1) { //if order is created already in postmeta, avoid duplication
     
    702703        add_post_meta($id, 'av_flag', '0', true);
    703704        add_post_meta($id, 'av_horodate', $time, true);
     705        $wcVersion = ntav_getConfig('WCVERSION');
     706        if($wcVersion >= 8.2){
     707            $wpdb->query("INSERT INTO " . $wpdb->prefix . "wc_orders_meta (order_id, meta_key, meta_value) VALUES (" . $id . ", 'av_flag', '0')");
     708        }
    704709    }
    705710}
     
    709714function ntav_av_new_order_2($id)
    710715{
     716    global $wpdb;
    711717    $time = time();
    712718    add_post_meta($id, 'av_flag', '0', true);
    713719    add_post_meta($id, 'av_horodate', $time, true);
     720    $wcVersion = ntav_getConfig('WCVERSION');
     721    if($wcVersion >= 8.2){
     722        $wpdb->query("INSERT INTO " . $wpdb->prefix . "wc_orders_meta (order_id, meta_key, meta_value) VALUES (" . $id . ", 'av_flag', '0')");
     723    }
    714724}
    715725
  • netreviews/trunk/readme.txt

    r3054488 r3103906  
    44Tags: avis,verifies,étoiles,reviews,stars,google,adwords,shopping,snippets,comments,customers
    55Requires at least: 1.3.1
    6 Tested up to: 6.1
     6Tested up to: 6.5.3
    77Stable tag: trunk
    88
     
    5757
    5858== Changelog ==
     59Version 2.4.1 / 12/06/2024
     60- Fix : getting orders when HPOS is activated
     61
    5962Version 2.4.0 / 18/03/2024
    6063- Addition new route getProductReviewsStats
Note: See TracChangeset for help on using the changeset viewer.