Plugin Directory

Changeset 2736503


Ignore:
Timestamp:
06/02/2022 03:31:53 PM (4 years ago)
Author:
usedrip
Message:

update to v1.2.1

  • fix to old php versions
Location:
drip-payments/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • drip-payments/trunk/drip-payments.php

    r2731925 r2736503  
    44 * Description: Forneça a Drip como opção de pagamento para pedidos do WooCommerce.
    55 * Author: Drip
    6  * Version: 1.2.0
     6 * Version: 1.2.1
    77 */
    88
     
    2929        public static $instance = false;
    3030        public static $log = false;
    31         public DripCacheService $drip_cache_service;
    32         public DripPaymentsCheckoutRequest $checkout_request;
    3331
    3432        public function __construct()
     
    191189            $order_number = $order->get_order_number();
    192190            $order_products = [];
    193             $order_products[] = [
    194                 'name' => "shipping",
    195                 'quantity' => 1,
    196                 'amount' => $order->get_shipping_total(),
    197                 'totalAmount' => $order->get_shipping_total()
    198             ];
     191            if ($order->get_shipping_total() > 0) {
     192                $order_products[] = [
     193                    'name' => "Frete",
     194                    'quantity' => 1,
     195                    'amount' => $order->get_shipping_total(),
     196                    'totalAmount' => $order->get_shipping_total()
     197                ];
     198            }
     199
    199200            foreach ($order->get_items() as $product_id_on_order => $product) {
    200201                $actual_product = $product->get_product();
  • drip-payments/trunk/readme.txt

    r2731925 r2736503  
    55Tested up to: 6.0
    66Requires PHP: 7.0
    7 Stable tag: 1.2.0
     7Stable tag: 1.2.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • drip-payments/trunk/src/DripCacheService.php

    r2731925 r2736503  
    55class DripCacheService
    66{
    7     private $date_time_service;
    8 
    97    public function __construct()
    108    {
  • drip-payments/trunk/src/DripPaymentsCheckoutRequest.php

    r2731925 r2736503  
    1414    const MERCHANT_ORDERS = 'v1/merchant/orders';
    1515    const ERROR_LOGGER = 'v1/merchants/log_plugin_error';
    16 
    17     private $drip_cache_service;
    1816
    1917    private static function options($testMode): array
  • drip-payments/trunk/src/DripUpdateAdminOptions.php

    r2731925 r2736503  
    33class DripUpdateAdminOptions
    44{
    5     private $drip_cache_service;
    6 
    75    public function __construct()
    86    {
    97        $this->drip_cache_service = new DripCacheService;
    108    }
     9
    1110    public function checkApiKeyIsOkForProduction($production_key)
    1211    {
  • drip-payments/trunk/src/DripUtils.php

    r2731925 r2736503  
    1111    const DRIP_PAYMENTS_BASE_URI_PRODUCTION = 'https://drip-be.usedrip.com.br/api/';
    1212
    13     const DRIP_PAYMENTS_ACTUAL_PLUGIN_VERSION = '1.2.0';
     13    const DRIP_PAYMENTS_ACTUAL_PLUGIN_VERSION = '1.2.1';
    1414}
    1515
Note: See TracChangeset for help on using the changeset viewer.