Changeset 2496004
- Timestamp:
- 03/15/2021 02:08:52 PM (5 years ago)
- Location:
- netreviews/trunk
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
functions.php (modified) (3 diffs)
-
netreviews.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
netreviews/trunk/changelog.txt
r2394291 r2496004 1 Version 2.3.6 / 06/10/2020 1 Version 2.3.7 / 15/03/2021 2 - Performance optimisation on install 3 4 Version 2.3.6 / 06/10/2020 2 5 - Fix number of stars displayed with badge 2 3 6 - Adapt product name and url to WPML lang when exporting CSV orders -
netreviews/trunk/functions.php
r2394291 r2496004 5 5 function ntav_update_version_plugin() 6 6 { 7 ntav_updateValue('MODVERSION', '2.3. 6');7 ntav_updateValue('MODVERSION', '2.3.7'); 8 8 } 9 9 … … 11 11 Fonction qui installe les tables du plugin et flag toutes les commandes à 1 12 12 */ 13 14 13 15 function ntav_install_db_av() 14 16 { 17 global $wpdb; 18 $time = time(); 19 $table = $wpdb->prefix . 'postmeta'; 15 20 16 21 ntav_create_table_conf(); 17 22 ntav_create_table_ave(); 18 23 ntav_create_table_rev(); 19 $time = time(); 20 24 25 //if old data exists in postmeta, initialize the datas 26 $wpdb->query("DELETE FROM $table where meta_key = 'av_flag' or meta_key = 'av_horodate'"); 27 28 29 $value_av_flag = ''; 30 $value_av_horodate = ''; 21 31 if (($list_orders_id = ntav_get_orders()) != NULL) { 22 foreach ($list_orders_id as $id) { 23 update_post_meta($id, 'av_flag', '1'); 24 update_post_meta($id, 'av_horodate', $time); 25 } 26 } 32 foreach ($list_orders_id as $key => $id) { 33 $data_link = ($key != (count($list_orders_id)-1)) ? "," : ";"; 34 $value_av_flag .= "(".$id.",'av_flag','1'),"; 35 $value_av_horodate .= "(".$id.",'av_horodate',$time)" . $data_link; 36 } 37 } 38 39 $wpdb->query("INSERT INTO $table (post_id,meta_key,meta_value) VALUE " . $value_av_flag . $value_av_horodate); 27 40 } 28 41 … … 179 192 if (($results = $wpdb->get_results("SELECT ID FROM " . $table_prefix . "posts " 180 193 . "WHERE post_type = 'shop_order'")) != NULL) { 194 // var_dump($results); 181 195 foreach ($results as $result) { 182 196 $list_ids[$i] = $result->ID; -
netreviews/trunk/netreviews.php
r2394291 r2496004 9 9 * Description: We provide you with a solution that enables you to collect customer reviews about your website and products which will show on your 10 10 * website and on a attestation which will increase the credibility of published reviews. 11 * Version: 2.3. 611 * Version: 2.3.7 12 12 * Author: NetReviews SAS <contact@avis-verifies.com> 13 13 * Author URI: www.avis-verifies.com
Note: See TracChangeset
for help on using the changeset viewer.