| Server IP : 104.21.25.182 / Your IP : 216.73.217.68 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/public_html/wp-content/plugins/woocommerce-multi-currency/plugins/ |
Upload File : |
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WOOMULTI_CURRENCY_Plugin_DhlExpress {
public function __construct() {
if ( ! empty( $_GET['section'] ) && $_GET['section'] === 'dhlexpress' ) {
add_action( 'woocommerce_settings_tabs_shipping', [ $this, 'add_currency_field' ] );
}
add_action( 'woocommerce_update_options_shipping_dhlexpress', [ $this, 'save_setting' ] );
}
public function add_currency_field() {
$dhl_currency = get_option( 'wmc_dhlexpress_curency' );
if ( ! $dhl_currency ) {
$dhl_currency = 'USD';
}
?>
<table class="form-table">
<tr>
<th><?php esc_html_e( 'Currency' ); ?></th>
<td>
<input type="text" name="wmc_dhlexpress_curency" value="<?php echo esc_attr( $dhl_currency ) ?>" placeholder="Default: USD">
</td>
</tr>
</table>
<?php
}
public function save_setting() {
if ( ! empty( $_POST['wmc_dhlexpress_curency'] ) ) {
$dhl_currency = sanitize_text_field( $_POST['wmc_dhlexpress_curency'] );
update_option( 'wmc_dhlexpress_curency', $dhl_currency );
}
}
}