Code Integration For Woocommerce Simple Auctions "Buy Now" Price
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 pleaseIf 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.
Quote from Theorigin on February 24, 2024, 00:29Hello team, I found this code snippet within your documentation at this URL: https://currency-switcher.com/codex/#code to allow this plugin to work with Woocommerce Simple Auctions:
add_filter('woocommerce_simple_auctions_get_current_bid', function ($price, $_this) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}return $price;
}, 20, 2);add_filter('woocommerce_simple_auctions_get_increase_bid_value', function ($bid, $_this) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$bid = $WOOCS->woocs_exchange_value(floatval($bid));
}
}return $bid;
}, 30, 2);add_filter('woocommerce_simple_auctions_place_bid_value', function ($bid, $product_id) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
$bid = $bid / $conversion_rate;
}
}return $bid;
}, 30, 2);This snippet works perfectly and I thank you very much for this integration code it is extremely helpful! There is just one issue, it does not work with the “Buy Now” feature for auctions. So the price remains the same for the buy now feature even when a user changes currencies. Is it possible to make this snippet work for that too?
Hello team, I found this code snippet within your documentation at this URL: https://currency-switcher.com/codex/#code to allow this plugin to work with Woocommerce Simple Auctions:
add_filter('woocommerce_simple_auctions_get_current_bid', function ($price, $_this) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
}
}
return $price;
}, 20, 2);
add_filter('woocommerce_simple_auctions_get_increase_bid_value', function ($bid, $_this) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$bid = $WOOCS->woocs_exchange_value(floatval($bid));
}
}
return $bid;
}, 30, 2);
add_filter('woocommerce_simple_auctions_place_bid_value', function ($bid, $product_id) {
if (class_exists('WOOCS')) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
$currencies = $WOOCS->get_currencies();
$conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
$bid = $bid / $conversion_rate;
}
}
return $bid;
}, 30, 2);
This snippet works perfectly and I thank you very much for this integration code it is extremely helpful! There is just one issue, it does not work with the “Buy Now” feature for auctions. So the price remains the same for the buy now feature even when a user changes currencies. Is it possible to make this snippet work for that too?
Quote from Pablo Borysenco on February 26, 2024, 13:02Hello
please drop me wp-admin+ftp access to your test site - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134615.png and exact link to the issue
And I'll add it to the adaptation queue
Hello
please drop me wp-admin+ftp access to your test site - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134615.png and exact link to the issue
And I'll add it to the adaptation queue
Quote from Theorigin on March 1, 2024, 09:42Yes of course, I have added the information to the area as stated (as well as an additional query, I hope that is okay)
Thank you for your consideration of these issues, your plugin is already the best currency switcher plugin, but these fixes would make it perfect! :)
All the best! Lars
Yes of course, I have added the information to the area as stated (as well as an additional query, I hope that is okay)
Thank you for your consideration of these issues, your plugin is already the best currency switcher plugin, but these fixes would make it perfect! :)
All the best! Lars
Quote from Pablo Borysenco on March 1, 2024, 12:12Hello
Ok! Great!
I'll write to you as soon as I get the result
Hello
Ok! Great!
I'll write to you as soon as I get the result
Quote from Theorigin on March 2, 2024, 09:52Wonderful, thank you very much!
Wonderful, thank you very much!
Quote from Pablo Borysenco on March 8, 2024, 18:58Hello
Please do a test
I added this code
add_filter( 'woocommerce_simple_auctions_minimal_bid_value', function($bid_value, $product_data, $bid){if (class_exists('WOOCS')) {global $WOOCS;if ($WOOCS->is_multiple_allowed) {$currencies = $WOOCS->get_currencies();$conversion_rate = $currencies[$WOOCS->current_currency]['rate'];$bid_value = $bid_value / $conversion_rate;}}return $bid_value;},30,3 );add_filter('single_add_to_cart_text', function($price_str, $product){if (class_exists('WOOCS')) {global $WOOCS;if ($WOOCS->is_multiple_allowed) {$price = $WOOCS->woocs_exchange_value($product->get_regular_price());$price_str = sprintf(__( 'Buy now for %s', 'wc_simple_auctions' ),wc_price($price));}}return $price_str;},30,2);
Hello
Please do a test
I added this code
Quote from Theorigin on March 9, 2024, 23:58Pablo you are amazing! I cannot thank you enough for your help, it works perfectly now! Your support for this plugin is beyond appreciated, there is no competition for currency switcher plugins with you around. Thank you once again!
Pablo you are amazing! I cannot thank you enough for your help, it works perfectly now! Your support for this plugin is beyond appreciated, there is no competition for currency switcher plugins with you around. Thank you once again!
Quote from Pablo Borysenco on March 11, 2024, 11:41Great! Welcome;)
Great! Welcome;)