diff --git a/CHANGELOG.md b/CHANGELOG.md index 56870c4..d459e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog All notable changes to this project will be documented in this file. +## 1.3.6 +Release Date: July 22, 2023 + +* Fixed: Persistent admin notices. +* Tweak: Added CSS fixes. +* Tested with WooCommerce v7.9. + ## 1.3.5 Release Date: June 11, 2023 diff --git a/includes/class-payment.php b/includes/class-payment.php index 504b35e..dc455b3 100644 --- a/includes/class-payment.php +++ b/includes/class-payment.php @@ -96,7 +96,7 @@ public function __construct() { add_filter( 'woocommerce_thankyou_order_received_text', array( $this, 'order_received_text' ), 99, 2 ); // Disable upi payment gateway - add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_gateway' ), 99 ); + add_filter( 'woocommerce_available_payment_gateways', array( $this, 'disable_gateway' ), 999 ); // Add order column data ( HPOS compatibility ) add_filter( 'woocommerce_shop_order_list_table_columns', array( $this, 'column_item' ) ); diff --git a/includes/css/checkout.min.css b/includes/css/checkout.min.css index 13c738f..69b1336 100644 --- a/includes/css/checkout.min.css +++ b/includes/css/checkout.min.css @@ -1 +1 @@ -.payment_box.payment_method_wc-upi{display:flex;flex-direction:column;gap:12px}.payment_box.payment_method_wc-upi p{margin:0 !important}.upiwc-checkout-payment-form{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background:rgba(0,0,0,0);margin:0 !important;padding:0 !important;border:none;gap:20px}@media only screen and (max-width: 576px){.upiwc-checkout-payment-form{flex-direction:column}}.upiwc-checkout-payment-form .upiwc-input{display:flex;flex-direction:column;gap:5px;margin:0 !important;padding:0 !important;width:100%}@media only screen and (max-width: 576px){.upiwc-checkout-payment-form .upiwc-input{width:100%}}.upiwc-checkout-payment-form .upiwc-input label{font-size:13px;font-weight:700;margin:0}.upiwc-checkout-payment-form .upiwc-input label .required{color:red}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field{display:flex;flex-direction:row;align-items:center;justify-content:center}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input{width:100%;max-height:36px;min-height:36px;text-transform:lowercase;margin:0 !important;border:1px solid #d0d0d0;padding:8px 8px;position:relative;z-index:1;box-sizing:border-box;border-radius:3px;font-size:13px;color:#303030;background-color:#fafbfc;outline:0;box-shadow:none;background-image:none;-webkit-appearance:none}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input.show-handle{border-top-right-radius:0;border-bottom-right-radius:0}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input:focus{border-color:#d0d0d0}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field .selectize-control:before{content:"@";position:absolute;display:block;top:50%;transform:translateY(-50%);left:8px;z-index:3;font-weight:700}.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field .selectize-input{box-shadow:none !important;padding-left:26px !important;background-color:#fafbfc !important;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0} \ No newline at end of file +.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi{display:flex;flex-direction:column;gap:12px}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>p{margin:0 !important}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background:rgba(0,0,0,0);margin:0 !important;padding:0 !important;border:none;gap:20px}@media only screen and (max-width: 576px){.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form{flex-direction:column}}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input{display:flex;flex-direction:column;gap:5px;margin:0 !important;padding:0 !important;width:100%}@media only screen and (max-width: 576px){.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input{width:100%}}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input label{font-size:13px;font-weight:700;margin:0}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input label .required{color:red}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field{display:flex;flex-direction:row;align-items:center;justify-content:center}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input#upiwc-address{width:100%;max-height:36px;min-height:36px;text-transform:lowercase;margin:0 !important;border:1px solid #d0d0d0;padding:8px 8px;position:relative;z-index:1;box-sizing:border-box;border-radius:3px;font-size:13px;color:#303030;background-color:#fafbfc;outline:0;box-shadow:none;background-image:none;-webkit-appearance:none}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input#upiwc-address.show-handle{border-top-right-radius:0;border-bottom-right-radius:0}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field input#upiwc-address:focus{border-color:#d0d0d0}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field .selectize-control:before{content:"@";position:absolute;display:block;top:50%;transform:translateY(-50%);left:8px;z-index:3;font-weight:700}.wc_payment_method.payment_method_wc-upi>.payment_box.payment_method_wc-upi>.upiwc-checkout-payment-form .upiwc-input .upiwc-input-field .selectize-input{box-shadow:none !important;padding-left:26px !important;background-color:#fafbfc !important;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0} \ No newline at end of file diff --git a/includes/css/checkout.scss b/includes/css/checkout.scss index d791f30..dba0d69 100644 --- a/includes/css/checkout.scss +++ b/includes/css/checkout.scss @@ -1,104 +1,104 @@ -.payment_box.payment_method_wc-upi { +.wc_payment_method.payment_method_wc-upi > .payment_box.payment_method_wc-upi { display: flex; flex-direction: column; gap: 12px; - p { + > p { margin: 0 !important; } -} -.upiwc-checkout-payment-form { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - background: transparent; - margin: 0 !important; - padding: 0 !important; - border: none; - gap: 20px; - - @media only screen and (max-width: 576px) { - flex-direction: column; - } - - .upiwc-input { + > .upiwc-checkout-payment-form { display: flex; - flex-direction: column; - gap: 5px; + flex-direction: row; + justify-content: space-between; + align-items: center; + background: transparent; margin: 0 !important; padding: 0 !important; - width: 100%; - + border: none; + gap: 20px; + @media only screen and (max-width: 576px) { - width: 100%; - } - - label { - font-size: 13px; - font-weight: 700; - margin: 0; - - .required { - color: #ff0000; - } + flex-direction: column; } - - .upiwc-input-field { + + .upiwc-input { display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - - input { + flex-direction: column; + gap: 5px; + margin: 0 !important; + padding: 0 !important; + width: 100%; + + @media only screen and (max-width: 576px) { width: 100%; - max-height: 36px; - min-height: 36px; - text-transform: lowercase; - margin: 0 !important; - border: 1px solid #d0d0d0; - padding: 8px 8px; - position: relative; - z-index: 1; - box-sizing: border-box; - border-radius: 3px; + } + + label { font-size: 13px; - color: #303030; - background-color: #FAFBFC; - outline: 0; - box-shadow: none; - background-image: none; - -webkit-appearance: none; - - &.show-handle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } + font-weight: 700; + margin: 0; - &:focus { - border-color:#d0d0d0; + .required { + color: #ff0000; } } - - .selectize-control:before{ - content: '@'; - position: absolute; - display: block; - top: 50%; - transform: translateY(-50%); - left: 8px; - z-index: 3; - font-weight: 700; - } + + .upiwc-input-field { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + + input#upiwc-address { + width: 100%; + max-height: 36px; + min-height: 36px; + text-transform: lowercase; + margin: 0 !important; + border: 1px solid #d0d0d0; + padding: 8px 8px; + position: relative; + z-index: 1; + box-sizing: border-box; + border-radius: 3px; + font-size: 13px; + color: #303030; + background-color: #FAFBFC; + outline: 0; + box-shadow: none; + background-image: none; + -webkit-appearance: none; + + &.show-handle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } - .selectize-input { - box-shadow: none !important; - padding-left: 26px !important; - background-color: #FAFBFC !important; - border-left: 0; - border-top-left-radius: 0; - border-bottom-left-radius: 0; + &:focus { + border-color:#d0d0d0; + } + } + + .selectize-control:before{ + content: '@'; + position: absolute; + display: block; + top: 50%; + transform: translateY(-50%); + left: 8px; + z-index: 3; + font-weight: 700; + } + + .selectize-input { + box-shadow: none !important; + padding-left: 26px !important; + background-color: #FAFBFC !important; + border-left: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } } } } diff --git a/readme.txt b/readme.txt index 9dd36e8..36f1862 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: infosatech Tags: upi, upi payment, woocommerce, qrcode, bhim upi, paytm upi, india Requires at least: 4.6 -Tested up to: 6.2 -Stable tag: 1.3.5 +Tested up to: 6.3 +Stable tag: 1.3.6 Requires PHP: 5.6 Donate link: https://www.sayandatta.co.in/donate License: GPLv3 @@ -106,6 +106,13 @@ Post detailed information about the issue in the [support forum](https://wordpre If you like UPI QR Code Payment Gateway for WooCommerce, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/upi-qr-code-payment-for-woocommerce/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! += 1.3.6 = +Release Date: July 22, 2023 + +* Fixed: Persistent admin notices. +* Tweak: Added CSS fixes. +* Tested with WooCommerce v7.9. + = 1.3.5 = Release Date: June 11, 2023 diff --git a/upi-qr-code-payment-for-woocommerce.php b/upi-qr-code-payment-for-woocommerce.php index 300ec22..40f998a 100644 --- a/upi-qr-code-payment-for-woocommerce.php +++ b/upi-qr-code-payment-for-woocommerce.php @@ -3,14 +3,14 @@ * Plugin Name: UPI QR Code Payment Gateway * Plugin URI: https://wordpress.org/plugins/upi-qr-code-payment-for-woocommerce/ * Description: It enables a WooCommerce site to accept payments through UPI apps like BHIM, Google Pay, Paytm, PhonePe or any Banking UPI app. Avoid payment gateway charges. - * Version: 1.3.5 + * Version: 1.3.6 * Author: Sayan Datta * Author URI: https://www.sayandatta.co.in * License: GPLv3 * Text Domain: upi-qr-code-payment-for-woocommerce * Domain Path: /languages * WC requires at least: 3.1 - * WC tested up to: 7.8 + * WC tested up to: 7.9 * * UPI QR Code Payment Gateway is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,7 +48,7 @@ final class UPIWC { * * @var string */ - public $version = '1.3.5'; + public $version = '1.3.6'; /** * Minimum version of WordPress required to run UPIWC. @@ -324,8 +324,8 @@ public function admin_notice() { } if ( $show_rating ) { - $dismiss = wp_nonce_url( add_query_arg( 'upiwc_rating_notice_action', 'dismiss_rating_true' ), 'upiwc_dismiss_rating_true' ); - $no_thanks = wp_nonce_url( add_query_arg( 'upiwc_rating_notice_action', 'no_thanks_rating_true' ), 'upiwc_no_thanks_rating_true' ); ?> + $dismiss = wp_nonce_url( add_query_arg( 'upiwc_notice_action', 'dismiss_rating' ), 'upiwc_notice_nonce' ); + $no_thanks = wp_nonce_url( add_query_arg( 'upiwc_notice_action', 'no_thanks_rating' ), 'upiwc_notice_nonce' ); ?>

5-star rating on WordPress? Just to help me spread the word and boost my motivation.', 'upi-qr-code-payment-for-woocommerce' ); ?>

@@ -336,16 +336,16 @@ public function admin_notice() { calculate_time() > strtotime( '-240 hours' ) - || '1' === get_option( 'upiwc_plugin_dismiss_donate_notice' ) - || apply_filters( 'upiwc_plugin_hide_sticky_donate_notice', false ) ) { - $show_donate = false; - } + $show_donate = false; + // if ( $this->calculate_time() > strtotime( '-15 days' ) + // || '1' === get_option( 'upiwc_plugin_dismiss_donate_notice' ) + // || apply_filters( 'upiwc_plugin_hide_sticky_donate_notice', false ) ) { + // $show_donate = false; + // } if ( $show_donate ) { - $dismiss = wp_nonce_url( add_query_arg( 'upiwc_donate_notice_action', 'dismiss_donate_true' ), 'upiwc_dismiss_donate_true' ); - $no_thanks = wp_nonce_url( add_query_arg( 'upiwc_donate_notice_action', 'no_thanks_donate_true' ), 'upiwc_no_thanks_donate_true' ); ?> + $dismiss = wp_nonce_url( add_query_arg( 'upiwc_notice_action', 'dismiss_donate' ), 'upiwc_notice_nonce' ); + $no_thanks = wp_nonce_url( add_query_arg( 'upiwc_notice_action', 'no_thanks_donate' ), 'upiwc_notice_nonce' ); ?>