Hi, currently i am afraid WPAdverts supports one currency per site only, what you could do is disable the currency validation at all (and users would enter a free text in the price field) would this work for you?
Thread Starter
ogoege
(@ogoege)
Hello, I tried to do this and the plug-in dropped everything, the field itself did, and where the bulletin board the price was shown only in figures, without the currency symbol (currency single price).
Now I have to reinstall the plugin and re-configure it.
Yes, it suits me.
What should I do?
-
This reply was modified 8 years, 1 month ago by
ogoege.
Hi, you will need to do two things, disable currency formatting in [adverts_add] and when displaying the Advert, the code below should do that, you can add it in your theme functions.php file
add_filter( "adverts_form_load", "customize_adverts_add" );
function customize_adverts_add( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "adverts_price" ) {
$form["field"][$key]["class"] = "";
$form["field"][$key]["filter"] = array();
}
}
return $form;
}
add_filter( "adverts_get_the_price", "my_adverts_get_the_price", 10, 2 );
function my_adverts_get_the_price( $price, $price_raw ) {
return $price_raw;
}
Thread Starter
ogoege
(@ogoege)
best helper and best plugin, thanks. rate 5 stars
Thanks :). I am closing this thread then.