Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
BeycanDeveloper committed Mar 22, 2024
1 parent 889a532 commit 885d1a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions classes/DokanCryptoPayWithdrawal.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function userSettingForm(array $args): void
<div class="dokan-w12">
<select name="settings[<?php echo esc_attr($this->key) ?>][network]" class="dokan-form-control dokan-cryptopay-network">
<?php foreach ($this->networks as $networkItem) : ?>
<option value='<?php echo json_encode($networkItem) ?>' <?php echo $this->isSelected($network, $networkItem) ? 'selected' : ''; ?>>
<option value='<?php echo wp_json_encode($networkItem) ?>' <?php echo esc_attr($this->isSelected($network, $networkItem) ? 'selected' : ''); ?>>
<?php echo esc_html($networkItem['name']) ?>
</option>
<?php endforeach; ?>
Expand All @@ -208,7 +208,7 @@ public function userSettingForm(array $args): void
$this->currentNetwork = $this->networks[0];
}
foreach ($this->currentNetwork['currencies'] as $currencyItem) : ?>
<option value='<?php echo json_encode($currencyItem) ?>' <?php echo isset($currency->symbol) && $currencyItem['symbol'] == $currency->symbol ? 'selected' : ''; ?>>
<option value='<?php echo wp_json_encode($currencyItem) ?>' <?php echo esc_attr(isset($currency->symbol) && $currencyItem['symbol'] == $currency->symbol ? 'selected' : ''); ?>>
<?php echo esc_html($currencyItem['symbol']) ?>
</option>
<?php endforeach;
Expand Down Expand Up @@ -371,8 +371,8 @@ function getCustomPaymentDetails(details, method, data) {
anotherDetails = '';
}
details = status == 'pending' ? anotherDetails + `
<button title="<?php echo sprintf(esc_attr__('Pay with %s', 'dokan-cryptopay'), $this->title) ?>" class="button button-small pay-with-cryptopay" data-key="<?php echo esc_attr($this->key); ?>" data-details='${JSON.stringify(data[method])}'>
<?php echo sprintf(esc_html__('Pay with %s', 'dokan-cryptopay'), $this->title) ?>
<button title="<?php echo esc_attr(sprintf(__('Pay with %s', 'dokan-cryptopay'), $this->title)) ?>" class="button button-small pay-with-cryptopay" data-key="<?php echo esc_attr($this->key); ?>" data-details='${JSON.stringify(data[method])}'>
<?php echo esc_html(sprintf(__('Pay with %s', 'dokan-cryptopay'), $this->title)) ?>
</button>
` : anotherDetails;
}
Expand Down
15 changes: 14 additions & 1 deletion dokan-cryptopay-withdrawal.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,20 @@
echo '
<div class="dokan-cryptopay-modal">
<div class="dokan-cryptopay-modal-content">
' . $gateway->runCryptoPay() . '
' .
wp_kses(
$gateway->runCryptoPay(),
[
'div' => [
'id' => [],
'class' => [],
'style' => [],
'data-*' => [],
'data-loading' => []
],
]
)
. '
</div>
</div>
';
Expand Down

0 comments on commit 885d1a8

Please sign in to comment.