From f1e8fc0834b269a2a56b0a6b460a8845dcfc47e1 Mon Sep 17 00:00:00 2001 From: Joshua Lewis Date: Tue, 31 Dec 2019 11:15:59 -0500 Subject: [PATCH] Allow merchants to disable the BitPay logo in the mini cart --- index.php | 24 ++++++++++++++++++++++-- readme.txt | 8 +++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 937b9c90..9e1b0558 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: BitPay Checkout for WooCommerce * Plugin URI: https://www.bitpay.com * Description: Create Invoices and process through BitPay. Configure in your WooCommerce->Payments plugin. - * Version: 3.12.1912 + * Version: 3.14.1912 * Author: BitPay * Author URI: mailto:integrations@bitpay.com?subject=BitPay Checkout for WooCommerce */ @@ -326,6 +326,18 @@ public function init_form_fields() 'default' => '2', ), + 'bitpay_checkout_mini' => array( + 'title' => __('Show in mini cart ', 'woocommerce'), + 'type' => 'select', + 'description' => __('Set to YES if you would like to show BitPay as an immediate checkout option in the mini cart', 'woocommerce'), + 'options' => array( + '1' => 'Yes', + '2' => 'No', + ), + 'default' => '2', + ), + + 'bitpay_checkout_show_logo' => array( 'title' => __('Show logo on Checkout ', 'woocommerce'), 'type' => 'select', @@ -520,7 +532,9 @@ function bpCheckout(){ //show on the mini cart function bitpay_mini_checkout() { - + $bitpay_checkout_options = get_option('woocommerce_bitpay_checkout_gateway_settings'); + $bitpay_checkout_mini = $bitpay_checkout_options['bitpay_checkout_mini']; + if($bitpay_checkout_mini == 1): $url = get_permalink( get_option( 'woocommerce_checkout_page_id' ) ); $url.='?payment=bitpay'; @@ -542,6 +556,7 @@ function bpMiniCheckout(){ '; +} #bitpay image on payment page function BPC_getBitPaymentIcon() { diff --git a/readme.txt b/readme.txt index 1cb38c4e..4684ebf8 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: bitcoin, bitcoin cash, payments, bitpay, cryptocurrency, payment gateway Requires at least: 4.9 Tested up to: 5.3 Requires PHP: 5.5 -Stable tag: 3.12.1912 +Stable tag: 3.14.1912 License: MIT License (MIT) License URI: https://github.com/bitpay/bitpay-checkout-for-woocommerce/blob/master/LICENSE @@ -114,6 +114,12 @@ You can contact our support team via the following form https://bitpay.com/reque == Changelog == += 3.14.1912 = +* Allow merchants to disable the BitPay logo in the mini cart + += 3.13.1912 = +* Added support for future release of BitPay Chrome extension + = 3.12.1912 = * Fixed issue where cart might not be restored after canceling the payment invoice