Plugin Directory

Changeset 2760445


Ignore:
Timestamp:
07/22/2022 07:26:05 PM (4 years ago)
Author:
usedrip
Message:

update plugin to v1.4.4

  • check if website is in pt_BR and currency ir BRL
  • check sale_price and use price as fallback
Location:
drip-payments/trunk
Files:
5 edited

Legend:

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

    r2752702 r2760445  
    44 * Description: Forneça a Drip como opção de pagamento para pedidos do WooCommerce.
    55 * Author: Drip
    6  * Version: 1.4.3
     6 * Version: 1.4.4
    77 */
     8//ini_set('display_errors', '1');
     9//ini_set('display_startup_errors', '1');
     10//error_reporting(E_ALL);
    811
    912// need to keep this order for correct functioning
     
    1720
    1821add_filter('woocommerce_payment_gateways', function ($gateways) {
    19     $gateways[] = 'WC_Drip_Gateway';
     22    if (get_locale() == 'pt_BR' && get_woocommerce_currency() == 'BRL') {
     23        $gateways[] = 'WC_Drip_Gateway';
     24    }
    2025    return $gateways;
    2126}, 10, 1);
  • drip-payments/trunk/readme.txt

    r2752702 r2760445  
    55Tested up to: 6.0
    66Requires PHP: 7.0
    7 Stable tag: 1.4.3
     7Stable tag: 1.4.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • drip-payments/trunk/src/DripPaymentsCheckoutRequest.php

    r2746562 r2760445  
    11<?php
    22
     3// check if exists guzzle client before require from vendor
     4//if (!class_exists('GuzzleHttp\Client')) {
    35require_once dirname(__FILE__) . '/../vendor/autoload.php';
     6//}
     7
    48include_once('DripCacheService.php');
    59
  • drip-payments/trunk/src/DripSingleProductBannerAndModal.php

    r2749285 r2760445  
    2020    if ($product == null) return;
    2121
    22     $product_price = method_exists($product, 'get_price') ? $product->get_price() : $product->price;
     22    $product_price = method_exists($product, 'get_sale_price') ? $product->get_sale_price() : $product->get_price();
    2323
    2424    $cached_cashback = (array) json_decode(get_option('drip_payments_actual_cashback'));
     
    5050
    5151        // compatibility with WC +3
    52         $product_price = method_exists($product, 'get_price') ? $product->get_price() : $product->price;
     52        $product_price = method_exists($product, 'get_sale_price') ? $product->get_sale_price() : $product->get_price();
    5353
    5454        $cached_cashback = (array) json_decode(get_option('drip_payments_actual_cashback'));
  • drip-payments/trunk/src/DripUtils.php

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