PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

what is the correct Hook to use this code

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello, I am looking for your support to change the currency when the payment by iyzico is required, so I want to use this code, but i am looking to know the correct hook for this code"

// Hook to modify the currency before payment
add_filter('your_currency_switcher_hook', 'convert_currency_for_iyzico');

function convert_currency_for_iyzico($order_currency) {
// Check if the payment gateway is Iyzico
$chosen_payment_method = WC()->session->get('chosen_payment_method');
if ($chosen_payment_method == 'iyzico') {
// Set the currency to dollars (USD)
return 'USD';
}

// For other payment methods, return the original currency
return $order_currency;
}

Hello

Please  read  this - https://currency-switcher.com/function/woocs-set_currency

your_currency_switcher_hook  - Unfortunately, such a hook does not exist. You should just check the current currency( https://currency-switcher.com/function/woocs-current_currency ) on the checkout page, for example in the wp_head hook