 Welcome back to the channel now one of the biggest plugins that we use in what this is actually called wukamas and wukamas provides payments for all countries are globally but I was looking through the number of currencies that available in wukamas and I realized that we have over 180 currencies that are recognized by as legal tender but in wukamas we had far less than that available and I decided to check for let's say the first country that our state that would look at which is Abkazia which has a Russian rabo with RUB and when I quickly checked for this in my settings as I was installing or even trying to change the settings in the back end I realized that this is not available so how do you make this currency available for your wukamas sure if you are from Abkazia I'm going to show you how to do it in very simple steps in a few lines of code you should be able to do this even if you're not a programmer I would advise in most cases for you to do this in a plugin so you would go to your plugins folder your website and go into the plugins folder which is found in the wp content open up a new folder and inside that folder put in a new file that has a similar name to your plugin if you choose not to do a plugin you can just paste the code that we shall write and drop it inside your functions dot php that's usually part of your themes folder so if you go in your wp content and got themes you can choose your current theme and then just go into this file which is called functions the php and then at the end of the file just simply paste your code and it will run so let's jump into the code to see how that works I have dumped my plugin folder from here into my vs code editor I'm going to start up a plugin quickly and I have a little snippet to help me do this so we need to add the plugin name which will be our currencies of the world let's think that is so so we'll give it our author name our author uri add currencies of the world and then we shall have a version that's okay and then I'll just change the license to something like gpl2 and then we can just have this prefixed as our currencies of the world as that so we could have it my library but I'll just use that for now so this is the real meat of the problem so when you go into your editor to start adding code first of all you need to just add a filter a filter is basically a function hook in a wordpress that allows you to tap into a particular contents that's readily available and you just add your own or you remove what is already existing so kukamas has some filters itself for example this is our kukamas currencies which is the hook that we'll use and then we're going to add on our own function that I'll call take you press add world currencies so I'm going to get some little real estate here so I'll just minimize that and then I'll cut this put this back here so we get this what we have right now and then we'll run it into a function and the function will be that them and we'll open with Akali brackets so the next thing that we need to do here is this function it comes with a couple of arguments that are with it what are these we just add currencies dollar currencies in here and this is an argument we get so we'll have to return this at the end of the day so we add return and then currencies even without modifying it we need to return it at the end of the day so that we just pass what was originally there now this is the place where we add our currency of ab kaziya now we get our currencies right here and then we'll have square brackets and inside it we are going to add the small r i u b for the russian kopek this is the the iso code so we use the iso code and get the fractional unit so that's what we're going to use now we'll have the r i u b in there then we're going to say it is equal to then we use these underskores there are two underskores here that will help us translate our plugin into several languages of the world so we'll have this and then we'll just call this the ab kaziya kopek kopek that's what we'll have there and then we're going to bring in our text domain which we had here copy and paste it we need to add our semicolon at the end here so with this alone we've been able to add that currency inside our wukamas so what I'm going to do is come back to my plugin section here in the administration area of wordpress I'll come back to the plugins and then what I'm going to do is activate our currencies of the world plugin after activating this I'll give this a little reload and then I'm going to come here and as I search for ab kaziya you realize that we have that kopek here and even the symbol is available initially we didn't have it but now we have it as part of our currencies that are available so you can use this to to make available the currency you can use this to as you're making your own custom payment gateway this is one of those codes that you will need to make sure that your currency is available when we look at our currency it's now available but it has its own unique sign here that is being picked from the ara ubi this is a common currency because it's a russian currency so I'm going to try to assume if we had ara ubi as our currency here so I'll reload this here and then let's see how we add our ab kaziya and if we look at it you actually see that it is empty doesn't have a currency a symbol inside it now what I'm going to do is add a new function down here that will allow us to actually add our currency symbol there and it's very very simple so we essentially have another filter which is called a wukama's currency now this time it will be in singular and we'll add an underscore and call it for symbol so we're going to also add another extension to our new function and we'll call it a teki press add world currency symbol so I'll copy this come down here to function add it and then we'll open our brackets to work with this now this particular function has two arguments that do come with it so we have what we call the currency underscore symbol and then it's also going to come with the currency argument as well so we have two arguments coming in here so at the end of our function we are going to return the currency symbol we are going to use a switch statement which basically looks for the currency that we have passed in here singular currency and then after getting this currency we're going to do a check and we're going to say if the case for this currency if you remember we passed currencies in this function here and we had aru b as the identifier of our abcaziako kopek in here so we're going to use it here in our case and say if we are looking at that particular currency then what we're going to do is we're going to have the currency symbol we're going to have the currency symbol and we're going to say it's going to equal to ar if that's what we've chosen and we are going to actually break this so we'll add break at the end of the day so let me just push this under so since we are passing two arguments here I'm going to come back to this filter here and add that we have a priority of 10 and we're going to pass two arguments in here now when I save this come back to our kama settings we're going to come back and we'll see that our currency that we saved has a new ar currency symbol right here thank you for watching the video if you enjoyed it give it a thumbs up and consider subscribing because we'll have new and exciting snippets that you can use for your ukama store thank you for watching and goodbye