
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on August 5, 2022, 11:12
Hello
Yes, just add to your link ?currency=XXX
An example: https://demo.wp-currency.com/?currency=GBP
Hello
Yes, just add to your link ?currency=XXX
An example: https://demo.wp-currency.com/?currency=GBP

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on August 6, 2022, 10:50
Hello
Sure, using PHP: https://wp-currency.com/function/wpcs-current_currency
Example: domain.com/currency=<?php global $WPCS; echo $WPCS->current_currency; ?>
For more API see please: https://wp-currency.com/codex
Hello
Sure, using PHP: https://wp-currency.com/function/wpcs-current_currency
Example: domain.com/currency=<?php global $WPCS; echo $WPCS->current_currency; ?>
For more API see please: https://wp-currency.com/codex

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on August 9, 2022, 11:56
Hello
If you want to use dynamic content you can use PHP code. One moment, another idea: you can create custom shortcode and implement it into your content like: domain.com[my_wpcs]
Add please next code into file functions.php and use:
add_shortcode('my_wpcs', function () {
global $WPCS;
$tail = '';
if ($WPCS->default_currency !== $WPCS->current_currency) {
$tail = '?currency=' . $WPCS->current_currency;
}
return $tail;
});
Hello
If you want to use dynamic content you can use PHP code. One moment, another idea: you can create custom shortcode and implement it into your content like: domain.com[my_wpcs]
Add please next code into file functions.php and use:
add_shortcode('my_wpcs', function () {
global $WPCS;
$tail = '';
if ($WPCS->default_currency !== $WPCS->current_currency) {
$tail = '?currency=' . $WPCS->current_currency;
}
return $tail;
});

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on August 10, 2022, 11:55
Hello
Please, for all comparisons use: $WPCS->current_currency
An example:
if ($WPCS->current_currency == 'USD') {
Hello
Please, for all comparisons use: $WPCS->current_currency
An example:
if ($WPCS->current_currency == 'USD') {