Plugin Directory

Changeset 3150616


Ignore:
Timestamp:
09/12/2024 08:28:02 AM (19 months ago)
Author:
cocolis
Message:

Version 1.1.1

  • Fix webhooks params parsing
Location:
cocolis
Files:
126 added
3 edited

Legend:

Unmodified
Added
Removed
  • cocolis/trunk/class/wc-cocolis-webhooks.php

    r2624127 r3150616  
    1616    function cocolis_webhook_offer_accepted($request)
    1717    {
    18         $data = $request->get_body_params();
     18        $data = $request->get_json_params();
    1919        $orderid = $data['external_id'];
    2020        $ride_id = $data['ride_id'];
     
    4242    function cocolis_webhook_offer_completed($request)
    4343    {
    44         $data = $request->get_body_params();
     44        $data = $request->get_json_params();
    4545        $orderid = $data['external_id'];
    4646        $event = $data['event'];
     
    6767    function cocolis_webhook_ride_published($request)
    6868    {
    69         $data = $request->get_body_params();
     69        $data = $request->get_json_params();
    7070        $orderid = $data['external_id'];
    7171        $event = $data['event'];
     
    108108    function cocolis_webhook_availabilities_buyer_filled($request)
    109109    {
    110         $data = $request->get_body_params();
     110        $data = $request->get_json_params();
    111111        $orderid = $data['external_id'];
    112112        $event = $data['event'];
     
    132132    function cocolis_webhook_availabilities_seller_filled($request)
    133133    {
    134         $data = $request->get_body_params();
     134        $data = $request->get_json_params();
    135135        $orderid = $data['external_id'];
    136136        $event = $data['event'];
     
    156156    function cocolis_webhook_offer_cancelled($request)
    157157    {
    158         $data = $request->get_body_params();
     158        $data = $request->get_json_params();
    159159        $orderid = $data['external_id'];
    160160        $event = $data['event'];
     
    180180    function cocolis_webhook_ride_expired($request)
    181181    {
    182         $data = $request->get_body_params();
     182        $data = $request->get_json_params();
    183183        $orderid = $data['external_id'];
    184184        $event = $data['event'];
  • cocolis/trunk/readme.txt

    r2991651 r3150616  
    5555
    5656== Changelog ==
     57= 1.1.1 =
     58* Fix webhooks params parsing
     59
    5760= 1.1.0 =
    5861* Always send content_value to API on ride creation to allow customers with insurance enabled by default to be able to create rides
  • cocolis/trunk/wc-cocolis-shipping.php

    r2988119 r3150616  
    77 * Author:  Cocolis.fr
    88 * Author URI: https://www.cocolis.fr
    9  * Version: 1.1.0
     9 * Version: 1.1.1
    1010 * Developer: Alexandre BETTAN, Sebastien FIELOUX
    1111 * Developer URI: https://github.com/btnalexandre, https://github.com/sebfie
     
    4242                 * @return void
    4343                 */
    44                 public function __construct()
     44                public function __construct($instance_id = 0)
    4545                {
    4646                    global $woocommerce;
     47                    $this->instance_id = absint( $instance_id );
    4748                    $this->id                 = 'cocolis';
    4849                    $this->method_title       = __('Cocolis Shipping Method', 'cocolis');
     
    6364                        'NL', 'AT', 'PL', 'PT', 'RO', 'SI', 'SK', 'FI', 'SE'
    6465                    );
     66
     67                    // $this->supports  = array(
     68                    //     'shipping-zones'
     69                    //  );
    6570
    6671                    $this->enabled = isset($this->settings['enabled']) ? $this->settings['enabled'] : 'yes';
     
    358363
    359364                                    $this->add_rate($rate);
    360 
    361 
    362365
    363366                                    if ($total >= 150) {
     
    399402    function add_cocolis_shipping_method($methods)
    400403    {
    401         $methods['add_cocolis_shipping_method'] = 'WC_Cocolis_Shipping_Method';
     404        $methods['cocolis'] = 'WC_Cocolis_Shipping_Method';
    402405        return $methods;
    403406    }
Note: See TracChangeset for help on using the changeset viewer.