Plugin Directory

Changeset 2972574


Ignore:
Timestamp:
09/28/2023 09:18:17 AM (2 years ago)
Author:
bring4you
Message:

Updata 1.0.10

Location:
bring4you/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bring4you/trunk/admin/partials/bring4you-admin-display.php

    r2963644 r2972574  
    1313 */
    1414
    15     $url = "https://bring4you.com/external-api/v1/priceEstimation?weight=10&volume=10000&origin_city=Paris,France&destination_city=Lille,France";
    16 
    17     $response_ssl = wp_remote_get($url);
    18     $response = wp_remote_get($url,array('sslverify' => FALSE));
    19     $body     = wp_remote_retrieve_body($response);
    20 
    21     $error = 0;
    22 
    2315   
    24     if(is_wp_error($response_ssl))
    25     {
    26         $error = 4;
    27     }
    28     else
    29     {
    30         if(is_wp_error($response))
    31         {
    32             $error = 1;
    33         }
    34         else
    35         {
    36             $resultArray = json_decode($body,true);
    37             if(!$resultArray)
    38             {
    39                 $error = 2;
    40             }
    41             else
    42             {
    43                 $price = $resultArray['value'];
    44                
    45                 if(!$price)
    46                 {
    47                     $error = 3;
    48                 }
    49             }
    50         }
    51     }
    52    
    53     $server = '';
    54    
    55     if($error == 0)
    56     {
    57         $server = 'Liaison serveur OK';
    58     }
    59     else
    60     {
    61         $server = 'Liaison serveur : ';
    62         if($error == 1)
    63             $server .= 'Aucune Réponse';
    64         elseif($error == 2)
    65             $server .= 'Body de la réponse incorrect';
    66         elseif($error == 3)
    67             $server .= 'Aucun prix retourné';
    68         elseif($error == 4)
    69             $server .= 'SSL Deactivated';
    70     }
    7116   
    7217?>
     
    7419<div class="panel">
    7520    <h3><i class="dashicons dashicons-admin-home"></i><?php _e('Module d\'envoi de Bring4You', 'b4y'); ?></h3>
    76     <img src="<?php echo plugins_url('/bring4you/views/img/carrier_image.jpg'); ?>" id="payment-logo" class="pull-right" title="<?php echo $server; ?>" alt="<?php echo $server; ?>"/>
     21    <img src="<?php echo plugins_url('/bring4you/views/img/carrier_image.jpg'); ?>" id="payment-logo" class="pull-right" title="" alt="<?php echo $server; ?>"/>
    7722    <p>
    7823        <strong><?php _e('Ceci est notre nouveau module !', 'b4y'); ?></strong><br />
     
    9641        <?php
    9742            echo sprintf(__( 'Pour ajouter Bring4You à votre installation Woocommerce vous devez ajouter la méthode d\'expédition à votre zone d\'expedition %sici%s.', 'b4y' ),'<a href="'.admin_url( 'admin.php?page=wc-settings&tab=shipping&section' ).'">','</a>');
     43        ?>
     44        <br/>
     45        <?php _e('Si vous n\'avez pas de clé merci d\'en commander une', 'b4y'); ?>
     46        <br/><br/>
     47        <?php
     48            echo sprintf(__( '%sCommandez votre clé d’API ici%s', 'b4y' ),'<a href="https://buy.stripe.com/28og1P5ZAeW3gKc5ks" class="button-primary">','</a>');
    9849        ?>
    9950    </p>
  • bring4you/trunk/bring4you.php

    r2963644 r2972574  
    3838 * Rename this for your plugin and update it as you release new versions.
    3939 */
    40 define( 'BRING4YOU_VERSION', '1.0.9' );
     40define( 'BRING4YOU_VERSION', '1.0.10' );
    4141
    4242/**
Note: See TracChangeset for help on using the changeset viewer.