Tweak To Integration With Woocommerce Simple Auctions Plugin
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 January 4, 2025, 04:25Hi PluginUs support, I hope you are well. I have this code snippet to make the Fox currency switcher plugin compatible with the Woocommerce Simple Auctions plugin and all its stored prices:
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);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);I got this code from your support/codex and I am eternally grateful for it. It works almost perfectly, except for two prices that are not converting properly (the currency prefix shows but the price is not properly converted). The “Max Bid” price, and the winning bid price: https://snipboard.io/Aual6o.jpg
I managed to make the “Max Bid” price convert properly using the following code:
// Apply currency conversion only to max bid price display
add_filter('wc_price', function($formatted_price, $price, $args) {
if (!is_admin() && class_exists('WOOCS')) {
// Check if we're inside the max-bid template
$debug_backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
$is_max_bid = false;foreach ($debug_backtrace as $trace) {
if (isset($trace['file']) && strpos($trace['file'], 'max-bid.php') !== false) {
$is_max_bid = true;
break;
}
}if ($is_max_bid) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
// Only convert if not already converted
if (!isset($args['_woocs_converted'])) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
$args['_woocs_converted'] = true;
return wc_price($price, $args);
}
}
}
}
return $formatted_price;
}, 99, 3);So this part is not really an issue, but I thought I would mention it so I could provide you the code to put into your codex if you were interested. Although honestly I am not a coder and don’t know if this code is a good solution or not in terms of efficiency, but it does work.
The second issue of the “Winning Bid” price is something I have not been able to figure out how to fix.
Of course this issue regards a third party plugin so I have no expectation for you to help in this fix, but I figured I would ask just in case on the off chance you might know how to make the winning bid price convert.
Thank you for your time and your great work!
Hi PluginUs support, I hope you are well. I have this code snippet to make the Fox currency switcher plugin compatible with the Woocommerce Simple Auctions plugin and all its stored prices:
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);
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);
I got this code from your support/codex and I am eternally grateful for it. It works almost perfectly, except for two prices that are not converting properly (the currency prefix shows but the price is not properly converted). The “Max Bid” price, and the winning bid price: https://snipboard.io/Aual6o.jpg
I managed to make the “Max Bid” price convert properly using the following code:
// Apply currency conversion only to max bid price display
add_filter('wc_price', function($formatted_price, $price, $args) {
if (!is_admin() && class_exists('WOOCS')) {
// Check if we're inside the max-bid template
$debug_backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
$is_max_bid = false;
foreach ($debug_backtrace as $trace) {
if (isset($trace['file']) && strpos($trace['file'], 'max-bid.php') !== false) {
$is_max_bid = true;
break;
}
}
if ($is_max_bid) {
global $WOOCS;
if ($WOOCS->is_multiple_allowed) {
// Only convert if not already converted
if (!isset($args['_woocs_converted'])) {
$price = $WOOCS->woocs_exchange_value(floatval($price));
$args['_woocs_converted'] = true;
return wc_price($price, $args);
}
}
}
}
return $formatted_price;
}, 99, 3);
So this part is not really an issue, but I thought I would mention it so I could provide you the code to put into your codex if you were interested. Although honestly I am not a coder and don’t know if this code is a good solution or not in terms of efficiency, but it does work.
The second issue of the “Winning Bid” price is something I have not been able to figure out how to fix.
Of course this issue regards a third party plugin so I have no expectation for you to help in this fix, but I figured I would ask just in case on the off chance you might know how to make the winning bid price convert.
Thank you for your time and your great work!
Quote from Pablo Borysenco on January 6, 2025, 11:33Hello
Thank you for your cooperation!
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
Describe in more detail how to get this price( “Winning Bid” ). You can use links, screenshots and videos
And as described in this article - https://currency-switcher.com/woocs-labs - I will add this plugin to the adaptation queue
Hello
Thank you for your cooperation!
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
Describe in more detail how to get this price( “Winning Bid” ). You can use links, screenshots and videos
And as described in this article - https://currency-switcher.com/woocs-labs - I will add this plugin to the adaptation queue
Quote from Theorigin on January 9, 2025, 12:47Thank you so much for your willingness to help! I have included as much detail as I could, but I had to slim down my response due to the character limit. It should be detailed enough, but if you have any questions please feel free to ask! Thanks again :)
Thank you so much for your willingness to help! I have included as much detail as I could, but I had to slim down my response due to the character limit. It should be detailed enough, but if you have any questions please feel free to ask! Thanks again :)
Quote from Pablo Borysenco on January 9, 2025, 12:54Hello
I'll write to you as soon as I get the result.
Hello
I'll write to you as soon as I get the result.
Quote from Theorigin on January 11, 2025, 00:27Wonderful thank you so much!
Wonderful thank you so much!
Quote from Theorigin on February 3, 2025, 02:42Hi Pablo, I hope you are well. I just wanted to let you know that it seems as though somebody on my team or that I work with changed the SFTP password recently, and I apologize if that was any inconvenience to you as I did not realize this until now. If a file manager plugin isn’t enough and you still need SFTP access just let me know and I will gladly provide the new password.
Thank you for your time and help!
Hi Pablo, I hope you are well. I just wanted to let you know that it seems as though somebody on my team or that I work with changed the SFTP password recently, and I apologize if that was any inconvenience to you as I did not realize this until now. If a file manager plugin isn’t enough and you still need SFTP access just let me know and I will gladly provide the new password.
Thank you for your time and help!
Quote from Pablo Borysenco on February 3, 2025, 10:22Hello
Please drop me sftp password
Hello
Please drop me sftp password
Quote from Theorigin on February 5, 2025, 08:01Gotcha the SFTP password has been updated within the provided info. Thank you again for your time and help!
Gotcha the SFTP password has been updated within the provided info. Thank you again for your time and help!
Quote from Pablo Borysenco on February 5, 2025, 11:02Ok! Great! thank you!
Ok! Great! thank you!
Quote from Theorigin on February 9, 2025, 12:14My pleasure, and thank you as well my friend!
My pleasure, and thank you as well my friend!
Quote from Pablo Borysenco on March 4, 2025, 14:02Hello
Checked your site - https://share.pluginus.net/image/i20250304135846.png - it looks like it "Winning Bid" converts correctly. Maybe I'm doing something wrong?
Hello
Checked your site - https://share.pluginus.net/image/i20250304135846.png - it looks like it"Winning Bid" converts correctly. Maybe I'm doing something wrong?
Quote from Theorigin on March 6, 2025, 07:24Hi Pablo, you are correct, the issue appears to be fixed on the staging site. When updating the SFTP password for you after it was changed, I noticed the same thing, the issue appeared to be fixed on the staging site. However I did not mention anything as I assumed this was due to some work you had done on the site to make it work, and maybe the final fix was still in progress. However I have checked my live site and the issue still remains on the live site. Are you sure you didn’t do any work a couple of weeks ago to fix this and maybe forgot about it? If you want I can produce another staging site so you can see the issue remains on the original/live site.
(As a side note, although the SFTP password was changed at some point and I had to provide you with a new one, the staging site was never accessed or edited by anyone)
Thank you for your time and help!
Hi Pablo, you are correct, the issue appears to be fixed on the staging site. When updating the SFTP password for you after it was changed, I noticed the same thing, the issue appeared to be fixed on the staging site. However I did not mention anything as I assumed this was due to some work you had done on the site to make it work, and maybe the final fix was still in progress. However I have checked my live site and the issue still remains on the live site. Are you sure you didn’t do any work a couple of weeks ago to fix this and maybe forgot about it? If you want I can produce another staging site so you can see the issue remains on the original/live site.
(As a side note, although the SFTP password was changed at some point and I had to provide you with a new one, the staging site was never accessed or edited by anyone)
Thank you for your time and help!
Quote from Pablo Borysenco on March 6, 2025, 10:55Hello
ok! I'll double check, yes we worked on this site before. Maybe the developer changed the code and didn't make a report.
Hello
ok! I'll double check, yes we worked on this site before. Maybe the developer changed the code and didn't make a report.
Quote from Pablo Borysenco on March 6, 2025, 13:46Hello
Yes, it seems it was my mistake, I didn't make the report. Sorry about that.
I added this code( https://share.pluginus.net/image/i20250306134145.png ):
add_filter('woocommerce_get_price_html', function($price, $_this){if ($_this->is_closed() && $_this->is_started() ){if ($_this->get_auction_closed() != '3'){if ($_this->get_auction_current_bid()){if ( $_this->is_reserve_met() != FALSE){$winning_price = $_this->get_auction_current_bid();if (class_exists('WOOCS')) {global $WOOCS;if ($WOOCS->is_multiple_allowed) {$winning_price = $WOOCS->woocs_exchange_value(floatval($winning_price));}}$price = __('<span class="winned-for auction">Winning Bid:</span> ','wc_simple_auctions').wc_price($winning_price);}}}}return $price;}, 10, 2 );please do a test
Hello
Yes, it seems it was my mistake, I didn't make the report. Sorry about that.
I added this code( https://share.pluginus.net/image/i20250306134145.png ):
Quote from Theorigin on March 7, 2025, 03:55You are amazing! Thank you so much for your help, it works perfectly! I just have one question, I see on the staging site you managed to make the bids on the auction activity table convert: https://snipboard.io/jRHsV8.jpg however the code snippet you provided does not manage to do this. I see that you edited the auction activity template file directly to do this. I tried pasting the template file into Claude AI to make a code snippet out of your work, however it was unable to do so. Did you ever manage to make a code snippet to do this? If not, no worries, just thought I would ask :)
Thank you for all your time and great help!
You are amazing! Thank you so much for your help, it works perfectly! I just have one question, I see on the staging site you managed to make the bids on the auction activity table convert: https://snipboard.io/jRHsV8.jpg however the code snippet you provided does not manage to do this. I see that you edited the auction activity template file directly to do this. I tried pasting the template file into Claude AI to make a code snippet out of your work, however it was unable to do so. Did you ever manage to make a code snippet to do this? If not, no worries, just thought I would ask :)
Thank you for all your time and great help!
Quote from Pablo Borysenco on March 7, 2025, 11:04Hello
Oh my god! It looks like I did that too but unfortunately I don't remember.
Looks like I made a temporary solution for the test and didn't make a report because I wanted to rework this code.
Yes, I will check this code.
Hello
Oh my god! It looks like I did that too but unfortunately I don't remember.
Looks like I made a temporary solution for the test and didn't make a report because I wanted to rework this code.
Yes, I will check this code.
Quote from Pablo Borysenco on March 7, 2025, 14:38Hello
Unfortunately, there is no way around this, in this case the only option is to change the plugin file - \woocommerce-simple-auctions\templates\shortcodes\my-auctions-acivity.php - https://share.pluginus.net/image/i20250307143623.png
if (class_exists('WOOCS')) {global $WOOCS;if ($WOOCS->is_multiple_allowed) {$bid = $WOOCS->woocs_exchange_value(floatval($bid));}}Of course, there is an option to make a custom shortcode to display this template, but this is no longer part of the LABS concept.
Hello
Unfortunately, there is no way around this, in this case the only option is to change the plugin file - \woocommerce-simple-auctions\templates\shortcodes\my-auctions-acivity.php - https://share.pluginus.net/image/i20250307143623.png
Quote from Theorigin on March 9, 2025, 01:02No worries my friend, thank you so much for all your time and help, it is beyond appreciated! By far the best currency conversion plugin and support! :)
Thanks again!
No worries my friend, thank you so much for all your time and help, it is beyond appreciated! By far the best currency conversion plugin and support! :)
Thanks again!
Quote from Pablo Borysenco on March 10, 2025, 11:01Thank you and welcome;)
Thank you and welcome;)