From 4dcc8c399069c208bd8e131cdc97b6ce86718651 Mon Sep 17 00:00:00 2001 From: Hasanuzzaman Date: Wed, 4 Oct 2023 01:27:25 +0600 Subject: [PATCH] Update nag removed, Ipn issue fix --- buy-me-coffee.php | 6 +----- includes/Builder/Methods/PayPal/PayPal.php | 8 -------- includes/Models/Supporters.php | 1 + src/js/Components/Supporter.vue | 2 +- src/js/main.js | 3 +++ src/scss/admin/app.scss | 3 +++ 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/buy-me-coffee.php b/buy-me-coffee.php index f29d723..15f0872 100644 --- a/buy-me-coffee.php +++ b/buy-me-coffee.php @@ -168,11 +168,7 @@ public function LoadEditorBlocks() // disabled admin-notice on dashboard add_action('admin_init', function () { - $disablePages = [ - 'buy-me-coffee.php', - ]; - // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if (isset($_GET['page']) && in_array($_GET['page'], $disablePages)) { + if (isset($_GET['page']) && $_GET['page'] === 'buy-me-coffee.php') { remove_all_actions('admin_notices'); } }); diff --git a/includes/Builder/Methods/PayPal/PayPal.php b/includes/Builder/Methods/PayPal/PayPal.php index 8bf4459..b2bc0f8 100644 --- a/includes/Builder/Methods/PayPal/PayPal.php +++ b/includes/Builder/Methods/PayPal/PayPal.php @@ -222,14 +222,6 @@ public function updateStatus($data, $payment_id) if ($transaction->payment_method != 'paypal') { return; } - $business_email = isset($data['business']) && is_email($data['business']) ? trim($data['business']) : trim($data['receiver_email']); - - $paypalSettings = $this->getSettings(); - - if (strcasecmp($business_email, trim($paypalSettings['paypal_email'])) != 0) { - $this->changeStatus('failed', $transaction); - return; - } $currency_code = strtolower($data['mc_currency']); diff --git a/includes/Models/Supporters.php b/includes/Models/Supporters.php index 680fb09..b12b370 100644 --- a/includes/Models/Supporters.php +++ b/includes/Models/Supporters.php @@ -32,6 +32,7 @@ public function index($args) $currencyTotal = wpmBmcDB()->table('wpm_bmc_supporters') ->groupBy('currency') ->where('payment_status', 'paid') + ->orWhere('payment_status', 'paid-initially') ->select(wpmBmcDB()->raw('SUM(payment_total) as total_amount, currency')) ->get(); diff --git a/src/js/Components/Supporter.vue b/src/js/Components/Supporter.vue index 23571ab..df41f3c 100644 --- a/src/js/Components/Supporter.vue +++ b/src/js/Components/Supporter.vue @@ -5,7 +5,7 @@
- Supporter's Image + Supporter's Image

{{supporter?.supporters_name}}

diff --git a/src/js/main.js b/src/js/main.js index 7336132..c16d9fe 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -21,3 +21,6 @@ router.afterEach((to, from) => { jQuery('.buymecoffee_main-menu-items').find('li[data-key='+active+']').addClass('active'); } }); + +jQuery('.update-nag,.notice, #wpbody-content > .updated, #wpbody-content > .error').remove(); + diff --git a/src/scss/admin/app.scss b/src/scss/admin/app.scss index 4eca070..f13a407 100644 --- a/src/scss/admin/app.scss +++ b/src/scss/admin/app.scss @@ -27,4 +27,7 @@ } } } +.notice.notice-error { + display: none !important; +} @import './global_css.scss'; \ No newline at end of file