Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
BeycanDeveloper committed Mar 27, 2024
1 parent b71e610 commit 8def9cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

$(document).ready(() => {
let CryptoPayApp;
const __ = wp.i18n.__;
const modal = $(".dokan-cryptopay-modal");

$(window).on('click', function(e) {
Expand Down Expand Up @@ -46,6 +47,8 @@

window.CryptoPayApp.events.add('transactionReceived', ({transaction}) => {
approve.trigger('click');
$(this).prop('disabled', true)
$(this).text(__('Processing...'))
cpHelpers.successPopup(window.CryptoPayLang.transactionSent, `
<a href="${transaction.getUrl()}" target="_blank">
${window.CryptoPayLang.openInExplorer}
Expand Down Expand Up @@ -74,6 +77,8 @@

window.CryptoPayLiteApp.events.add('transactionReceived', ({transaction}) => {
approve.trigger('click');
$(this).prop('disabled', true)
$(this).text(__('Processing...'))
cplHelpers.successPopup(window.CryptoPayLiteLang.transactionSent, `
<a href="${transaction.getUrl()}" target="_blank">
${window.CryptoPayLiteLang.openInExplorer}
Expand Down
2 changes: 1 addition & 1 deletion dokan-cryptopay-withdrawal.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

if (isset($_GET['page']) && 'dokan' === $_GET['page']) {
add_action('admin_enqueue_scripts', function (): void {
wp_enqueue_script('dokan-cryptopay', plugin_dir_url(__FILE__) . 'assets/js/main.js', ['jquery'], DOKAN_CRYPTOPAY_VERSION, true);
wp_enqueue_script('dokan-cryptopay', plugin_dir_url(__FILE__) . 'assets/js/main.js', ['jquery', 'wp-i18n'], DOKAN_CRYPTOPAY_VERSION, true);
wp_localize_script('dokan-cryptopay', 'DokanCryptoPay', [
'currency' => get_woocommerce_currency(),
'apiUrl' => home_url('/wp-json/dokan/v1/withdraw/')
Expand Down

0 comments on commit 8def9cf

Please sign in to comment.