Skip to content

Commit

Permalink
Version 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mhimon committed Aug 12, 2024
1 parent 34a8e8e commit eeb3021
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bd-payment-gateways.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Bangladeshi Payment Gateways - Make Payment Using QR Code
* Plugin URI: https://ultradevs.com/products/wp-plugin/bangladeshi-payment-gateways/
* Description: Bangladeshi Payment Gateways for WooCommerce.
* Version: 3.0.0
* Version: 3.0.1
* Author: ultraDevs
* Author URI: https://ultradevs.com
* License: GPL v2 or later
Expand Down
9 changes: 6 additions & 3 deletions includes/BDPG_Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public function __construct() {
);
$this->accounts = get_option( 'bdpg_' . $this->gateway . '_accounts', [] );


add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'save_accounts' ) );
add_action( 'woocommerce_thankyou_woo_' . $this->gateway, array( $this, 'bdpg_thankyou' ) );
Expand All @@ -132,7 +133,8 @@ public function __construct() {
add_action( 'woocommerce_admin_order_data_after_billing_address', array( $this, 'admin_order_data' ) );

$settings = get_option( 'woocommerce_woo_' . $this->gateway . '_settings' );
if ( isset( $settings['gateway_charge'] ) && 'yes' === $settings['gateway_charge'] ) {

if ( isset( $settings[ $this->gateway . '_charge' ] ) && 'yes' === $settings[ $this->gateway . '_charge' ] ) {
add_action( 'woocommerce_cart_calculate_fees', array( $this, 'charge_settings' ), 20, 1 );
}

Expand Down Expand Up @@ -236,7 +238,7 @@ public function payment_fields() {
$total_payment= $woocommerce->cart->total ;
$symbol = get_woocommerce_currency_symbol();
if ( get_woocommerce_currency() === 'USD' ){
$total_payment = $this->dollarRate * $woocommerce->cart->total;
$total_payment = $this->dollar_rate * $woocommerce->cart->total;
$symbol = get_woocommerce_currency_symbol('BDT');
}

Expand Down Expand Up @@ -565,7 +567,8 @@ public function admin_order_data( $order ) {
*/
public function charge_settings( $cart ) {
global $woocommerce;
$settings = get_option( 'woocommerce_woo_' . $this->gateway . '__settings' );
$settings = get_option( 'woocommerce_woo_' . $this->gateway . '_settings' );


$av_gateways = $woocommerce->payment_gateways->get_available_payment_gateways();
if ( ! empty( $av_gateways ) ) {
Expand Down
16 changes: 14 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Donate link: https://ultradevs.com/donate/
Tags: mobile payment gateways, bangladeshi mobile banking, payment, gateway, bKash, rocket,nagad,upay qr code, qr code
Requires at least: 4.4
Tested up to: 6.6.1
Stable tag: 3.0.0
Requires PHP: 5.6
Stable tag: 3.0.1
Requires PHP: 7.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -31,6 +31,14 @@ Bangladeshi Payment Gateways for WooCommerce. It has some advanced features that

[youtube https://www.youtube.com/watch?v=ArJ-zOW1KBU]


### Our Other Plugins.
[Easy Dropbox Integration For WordPress](https://wordpress.org/plugins/easy-dropbox-integration/)
[Random Image Block for Block Editor](https://wordpress.org/plugins/random-image-block-for-block-editor/)
[UltraEmbed – Advanced Iframe Plugin For WordPress with Gutenberg Block Included](https://wordpress.org/plugins/ultraembed-advanced-iframe/)
[TestimonialX – Testimonial Block For Gutenberg Block Editor with 15+ Stunning Styles](https://wordpress.org/plugins/testimonialx-block/)


### Need Help?

[Free Support](https://wordpress.org/support/plugin/bangladeshi-payment-gateways/) | [Live Chat](https://web.facebook.com/hello.ultradevs) | [Documentation](https://ultradevs.com/docs/bangladeshi-payment-gateways) | [Video Tutorials](https://www.youtube.com/playlist?list=PL6-MOhUm73eiSSVHgAVnFFEvs6rO2sZyC)
Expand Down Expand Up @@ -79,6 +87,10 @@ No, You must install and active woocommerce plugin to make this plugin work.

== Changelog ==

= 3.0.1 - 13/08/2024 =
*Fix: Gateway Fee Issue
*Fix: USD to BDT Conversion

= 3.0.0 - 10/08/2024 =
* Code Refactor
* Fixed PHP Warnings
Expand Down

0 comments on commit eeb3021

Please sign in to comment.