Plugin Directory

Changeset 2318127


Ignore:
Timestamp:
06/04/2020 12:52:57 PM (6 years ago)
Author:
avisverifies
Message:

RELEASE Woocommerce 2.3.2 - Uninstall tables when uninstall hook instead of deactivation hook - Select template if not chosen

Location:
netreviews/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • netreviews/trunk/api_functions.php

    r2294433 r2318127  
    1111    if (ntav_check_isApiActive() == false) {
    1212        return array(
    13             'debug' => 'Module Disabled',
     13            'debug' => 'Module Disabled. Check if module is active in its tab configuration in Wordpress Back Office.',
    1414            'return' => 2, //Module désactivé
    1515            'query' => 'isActive'
     
    470470    //$explode_secret_key = explode('-',$this->secretkey);
    471471    $temp = array(
    472         'Version_PS' => ntav_getConfig('WCVERSION','non'),
     472        'Version_Woocommerce' => ntav_getConfig('WCVERSION','non'),
    473473        'Version_WP' => $wp_version,
    474474        'Version_Module' => ntav_getConfig('MODVERSION','non'),
  • netreviews/trunk/changelog.txt

    r2299077 r2318127  
     1Version: 2.3.2  / 22/05/2020
     2- Uninstall tables when uninstall hook instead of deactivation hook
     3- Select template if not chosen
     4
    15Version: 2.3.1  / 05/05/2020
    26- Fix override of datepicker format date in Back-Office manual export
  • netreviews/trunk/functions.php

    r2299077 r2318127  
    55function ntav_update_version_plugin()
    66{
    7     ntav_updateValue('MODVERSION', '2.3.1');
     7    ntav_updateValue('MODVERSION', '2.3.2');
    88}
    99
  • netreviews/trunk/includes/av_backoffice.php

    r2299077 r2318127  
    107107$enableMedia = ntav_getConfig('MEDIADISPLAY','non');
    108108
    109 if(!ntav_getConfig('DESIGN_PRODUCT_PAGE','non') && !ntav_getConfig('TEMPLATE_PRODUCT_PAGE','non')){
     109if(!ntav_getConfig('DESIGN_PRODUCT_PAGE','non')){
    110110    ntav_updateValue('DESIGN_PRODUCT_PAGE',1,NULL,NULL);
     111}
     112
     113if(!ntav_getConfig('TEMPLATE_PRODUCT_PAGE','non')){
    111114    ntav_updateValue('TEMPLATE_PRODUCT_PAGE',1,NULL,NULL);
    112115}
  • netreviews/trunk/includes/css/netreviews-style-2017.css

    r2299077 r2318127  
    100100}
    101101
     102.woocommerce-product-rating.netreviews-product-rating > span{
     103    display: flex !important;
     104}
     105
    102106.netreviews-product-rating span > div.netreviews_bg_stars_big.headerStars{
    103107    line-height: 17px !important;
     
    189193
    190194.netreviewsProductWidgetNewLogo{
    191     position: absolute;
    192     top: 0;
    193     left: 0;
    194     width: 65px;
    195     height: 65px;
    196     border: none;
    197     outline: 0;
     195    position: absolute !important;
     196    top: 0 !important;
     197    left: 0 !important;
     198    width: 65px !important;
     199    height: 65px !important;
     200    border: none !important;
     201    outline: 0 !important;
    198202}
    199203
     
    290294
    291295.av_product_award img#sceau{
    292     position: absolute;
    293     right: -12px;
    294     top: -10px;
    295     width: 90px;
     296    position: absolute !important;
     297    right: -12px !important;
     298    top: -10px !important;
     299    width: 90px !important;
    296300}
    297301
     
    501505
    502506.netreviews_tpl_v1 .netreviews_logo {
    503     position: absolute;
    504     top: 20px;
    505     left: 15px;
    506     width: 200px;
    507     height: auto;
     507    position: absolute !important;
     508    top: 20px !important;
     509    left: 15px !important;
     510    width: 200px !important;
     511    height: auto !important;
    508512}
    509513
     
    646650    left: 0;
    647651    text-align: center;
    648     font-size: 16px;
     652    font-size: 13px;
    649653}
    650654
     
    12611265
    12621266.netreviews_tpl_v2 .netreviews_logo {
    1263     width: 200px;
    1264     height: 40px
     1267    width: 200px !important;
     1268    height: 40px !important;
    12651269}
    12661270
    12671271.netreviews_tpl_v2 .netreviews_logo #netreviews_logo_img {
    1268     width: 100%;
    1269     height: auto
     1272    width: 100% !important;
     1273    height: auto !important;
    12701274}
    12711275
     
    14201424}
    14211425
    1422 .netreviews_tpl_v2 .display {
     1426.netreviews_tpl_v2 .displayAVBtn {
    14231427    vertical-align: sub
    14241428}
     
    15861590
    15871591.netreviews_tpl_v2 #netreviews_reviews_section {
    1588     display: inline-block;
     1592    display: block;
    15891593}
    15901594
     
    21192123    }
    21202124    .netreviews_tpl_v2 .netreviews_logo {
    2121         display: block ;
    2122         margin: 5px auto ;
    2123         top: 0
     2125        display: block !important;
     2126        margin: 5px auto !important;
     2127        top: 0 !important;
    21242128    }
    21252129    .netreviews_tpl_v2 .netreviews_certification {
     
    21612165@media screen and (max-width:440px) {
    21622166    .netreviews_tpl_v2 .netreviews_logo img{
    2163         width: 80%;
     2167        width: 80% !important;
    21642168    }
    21652169    .netreviews_tpl_v2 .netreviews_rating_content{
  • netreviews/trunk/includes/js/av_product_tab.js

    r2294433 r2318127  
    133133    var rate        = '';
    134134    var wpmlLang = $avjq("#wpml_Lang").val();
    135 
     135    var templateVersion = $avjq("#templateVersion").val();
    136136
    137137    // Si on filtre actuellement par note
     
    149149        url: urlAjax,
    150150        type: "GET",
    151         data: { pagination : page, product_id : idProd, tri_avis: tri_avis, rate: rate, nrLang : wpmlLang},
     151        data: { pagination : page, product_id : idProd, tri_avis: tri_avis, rate: rate, nrLang : wpmlLang, tpl: templateVersion},
    152152        success: function(html){
    153153
  • netreviews/trunk/includes/review_Pagination.php

    r2294433 r2318127  
    1010$helpfulOption = ntav_getConfig('HELPFULOPTION', 'non');
    1111$mediaDisplay = ntav_getConfig('MEDIADISPLAY', 'non');
    12 $chosenTemplate = ntav_getConfig('TEMPLATE_PRODUCT_PAGE', 'non');
     12$templateVersion = ntav_getConfig('TEMPLATE_PRODUCT_PAGE', 'non');
    1313
    1414$output = json_decode(json_encode($reviews), true);
     
    9494        </div>
    9595        <div class="netreviews_review_part">
    96             <?php if ($chosenTemplate == '1') { ?>
     96            <?php if ($templateVersion == '1') { ?>
    9797               
    9898                <p class="netreviews_customer_name"><?php echo urldecode($review['customer_name']); ?>
     
    154154                <?php } ?>
    155155
    156             <?php } elseif ($chosenTemplate == '2') { ?>
     156            <?php } elseif ($templateVersion == '2') { ?>
    157157
    158158                <div class="netreviews_stars_rate">
     
    256256        } ?>
    257257
    258         <?php if ($chosenTemplate == '2' && $helpfulOption == 'yes') { ?>
     258        <?php if ($templateVersion == '2' && $helpfulOption == 'yes') { ?>
    259259            <div class="netreviews_helpful_block"><?php echo __('Was this review helpful ?', 'av'); ?>
    260260                <a href="javascript:" class="netreviewsVote" data-review-id="<?php echo $idProduitCible; ?>"
  • netreviews/trunk/includes/templates/templateV1.php

    r2294433 r2318127  
    2727    <input type="hidden" id="avisVarifiesAjaxUrl" value="<?php echo $avisAjaxUrl ?>"/>
    2828    <input type="hidden" id="wpml_Lang" value = "<?php echo $my_current_lang?>"/>
    29 
     29    <input type="hidden" id="templateVersion" value = "<?php echo $templateVersion?>"/>
    3030
    3131    <!-- netreviews tab -->
     
    159159                       data-page="1" data-page-last=" <?php echo $maxPages ?>"
    160160                       onclick="javascript:paginationReviews(event);">
    161                         <span class="display"><?php _e('More reviews', 'av'); ?></span>
     161                        <span class="displayAVBtn"><?php _e('More reviews', 'av'); ?></span>
    162162                    </a>
    163163                </div>
  • netreviews/trunk/includes/templates/templateV2.php

    r2294433 r2318127  
    2828<input type="hidden" id="avisVarifiesAjaxUrl" value="<?php echo $avisAjaxUrl ?>"/>
    2929<input type="hidden" id="wpml_Lang" value = "<?php echo $my_current_lang?>"/>
     30<input type="hidden" id="templateVersion" value = "<?php echo $templateVersion?>"/>
    3031
    3132<div id="netreviews_reviews_tab" class="netreviews_tpl_v2">
     
    138139                    <div class="netreviews_all_reviews">
    139140                        <div onclick="refreshReviewsWithFilter('newest')">
    140                             <span class="display"><?php _e('All the reviews', 'av'); ?></span>
     141                            <span class="displayAVBtn"><?php _e('All the reviews', 'av'); ?></span>
    141142                            <i class="netreviews_arrow_up"></i>
    142143                        </div>
     
    182183                                <div class="netreviews_button" data-idProd="<?php echo $id_product ?>" id="av_load_next_page"
    183184                                     data-page="1" data-page-last="<?php echo $maxPages ?>"  onclick="paginationReviews(event);">
    184                                     <span class="display"><?php _e('Display more reviews', 'av'); ?></span>
     185                                    <span class="displayAVBtn"><?php _e('Display more reviews', 'av'); ?></span>
    185186                                    <i class="netreviews_arrow_down"></i>
    186187                                </div>
  • netreviews/trunk/netreviews.php

    r2299077 r2318127  
    99 * Description: We provide you with a solution that enables you to collect customer reviews about your website and products which will show on your
    1010 * website and on a attestation which will increase the credibility of published reviews.
    11  * Version: 2.3.1
     11 * Version: 2.3.2
    1212 * Author: NetReviews SAS <contact@avis-verifies.com>
    1313 * Author URI: www.avis-verifies.com
     
    1818
    1919
    20 
    2120if (!defined('ABSPATH')) exit; // Exit if accessed directly
    2221
     
    3029//////////////////////////////////      INSTALLATION | ACTIVATION   //////////////////////////////////////////
    3130//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    32 
    3331
    3432/**
     
    219217}
    220218
    221 // DEACTIVATION HOOK
    222 register_deactivation_hook(__FILE__, 'ntav_netreviews_plugin_deactivate');
    223 function ntav_netreviews_plugin_deactivate()
     219// UNINSTALL HOOK
     220register_uninstall_hook(__FILE__, 'ntav_netreviews_plugin_uninstall');
     221function ntav_netreviews_plugin_uninstall()
    224222{
    225223    ntav_uninstall_db_av();
     
    469467}
    470468
    471 if (ntav_getConfig('OUR_PRODUCT_RATING',$my_current_lang) == 1 && ntav_getConfig('OUR_PRODUCT_RICHSNIP',$my_current_lang) == 1 && ntav_getConfig('TYPE_SNIPPET',$my_current_lang) == 'jsonld') {
    472     add_action('wp_footer', 'ntav_netreviews_jsonld_product');
    473 }
    474 
    475469// fonction rajoutant les rich snippet produit sous format json ld
    476470function ntav_netreviews_jsonld_product($product = null){
     
    595589
    596590    $count = ntav_get_netreviews_count($id_product,$my_current_lang);
     591
     592    if (ntav_getConfig('OUR_PRODUCT_RATING',$my_current_lang) == 1 && ntav_getConfig('OUR_PRODUCT_RICHSNIP',$my_current_lang) == 1 && ntav_getConfig('TYPE_SNIPPET',$my_current_lang) == 'jsonld') {
     593        ntav_netreviews_jsonld_product();
     594    }
    597595
    598596    if (ntav_getConfig('IS_ACTIVE','non') == 1 && $count >= 1) {
Note: See TracChangeset for help on using the changeset viewer.