Currency Not listed | WordPress.org

[ad_1]

Hey @dallaspressobh,

Thank you for reaching out! Indeed, the Bahraini Dinar isn’t part of SliceWP’s currency list.

Even so, I have added your request to our development log and the currency will be added in the next plugin update.

Until then, please add the following code to your website to register the Bahraini Dinar:

function slicewp_custom_register_currency_BHD( $currencies ) {
	
	$currencies['BHD'] = array(
		'name'                => __( 'Bahraini dinar', 'slicewp' ),
		'symbol'              => '.د.ب',
		'symbol_position'     => 'before',
		'decimal_places'      => 3,
		'thousands_separator' => ',',
		'decimal_separator'   => '.'
	);
	
	return $currencies;
	
}
add_filter( 'slicewp_register_currency', 'slicewp_custom_register_currency_BHD' );


function slicewp_custom_sanitize_amount_decimals( $decimal_places ) {
	
	return 3;
	
}
add_filter( 'slicewp_sanitize_amount_decimals', 'slicewp_custom_sanitize_amount_decimals' );

If you’re not sure how to add custom code snippets to your website, you can use the Code Snippets plugin ).

Please try it out and let me know how it goes.

Thank you and best wishes,

Mihai

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer