Plugin Directory

Changeset 2115613


Ignore:
Timestamp:
07/01/2019 03:50:59 PM (7 years ago)
Author:
apeschar
Message:

Update plugin

Location:
evalor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • evalor/trunk/common/woocommerce.php

    r1887531 r2115613  
    143143            }, $value);
    144144        }
    145         if (is_callable([$value, 'get_data'])) {
    146             return $this->get_data($value);
    147         }
    148         if (is_callable([$value, '__toString'])) {
    149             return (string)$value;
    150         }
     145        try {
     146            return $this->call_method($value, 'get_data');
     147        } catch (Exception $e) {}
     148        try {
     149            return $this->call_method($value, '__toString');
     150        } catch (Exception $e) {}
    151151        if (is_object($value)) {
    152152            return new \stdClass();
     
    156156
    157157    private function get_data($value, $default = null) {
    158         if (!is_callable([$value, 'get_data']) || !is_object($value)) {
     158        try {
     159            return $this->call_method($value, 'get_data');
     160        } catch (Exception $e) {
    159161            return $default;
    160162        }
    161         $method = new ReflectionMethod($value, 'get_data');
     163    }
     164
     165    private function call_method($obj, $name) {
     166        $method = new ReflectionMethod($obj, $name);
    162167        if ($method->getNumberOfRequiredParameters() > 0) {
    163             return $default;
     168            throw new RuntimeException("Method requires parameters");
    164169        }
    165         return @$value->get_data();
     170        return $method->invoke($obj);
    166171    }
    167172}
  • evalor/trunk/evalor.php

    r2077184 r2115613  
    44Plugin URI: https://www.evalor.es/tienda/modulo/wordpress/
    55Description: El módulo WordPress facilita la integración del innovador sidebar de evalor en su web WordPress o tienda WooCommerce.  Para los usuarios del WooCommerce Plugin para WordPress el módulo se encarga de invitar de forma automática a los clientes para que compartan su experiencia. Esta funcion solo esta disponible para clientes PLUS.  Cuando el proceso del pedido ha finalizado se envia automaticamente una invitacion al cliente para que comparta su experiencia. Asi se genera confianza y aumenta la conversion de su tienda online.
    6 Version: v1.6.8
     6Version: v1.6.9
    77Author: Albert Peschar
    88Author URI: https://peschar.net/
  • evalor/trunk/readme.txt

    r2077184 r2115613  
    2323
    2424== Changelog ==
     25
     26= 1.6.9 =
     27* Fix fatal error when order contains incomplete unserialized objects.
    2528
    2629= 1.6.8 =
Note: See TracChangeset for help on using the changeset viewer.