Skip to content

Commit

Permalink
Update nag removed, Ipn issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanuzzamanbe committed Oct 3, 2023
1 parent 564b676 commit 4dcc8c3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
6 changes: 1 addition & 5 deletions buy-me-coffee.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
});
Expand Down
8 changes: 0 additions & 8 deletions includes/Builder/Methods/PayPal/PayPal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down
1 change: 1 addition & 0 deletions includes/Models/Supporters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/js/Components/Supporter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</h3>
<div class="wpm_supporter_profile_wrapper">
<div class="wpm_supporter_profile_section">
<img :src="supporter?.supporters_image" alt="Supporter's Image" class="wpm_supporter_profile_image">
<img v-if="supporter?.supporters_image" :src="supporter?.supporters_image" alt="Supporter's Image" class="wpm_supporter_profile_image">
</div>
<div>
<h3 v-if="supporter?.supporters_name" class="wpm_supporter_profile_name">{{supporter?.supporters_name}}</h3>
Expand Down
3 changes: 3 additions & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

3 changes: 3 additions & 0 deletions src/scss/admin/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@
}
}
}
.notice.notice-error {
display: none !important;
}
@import './global_css.scss';

0 comments on commit 4dcc8c3

Please sign in to comment.