 We'll come back to the channel. Since the last time we did a small change to our WooCommerce, we found that we could actually add a packaging price to our total and it was shown. Now a friend of mine asked me and told me, you know I have so many unusable fields that are part of the checkout process so I would like to remove those. So today we're going to be looking at how we can actually reduce these fields. Maybe we don't want the phone, the postal code. I remember that these that have the red mark are actually necessary and they are very much needed for the process of checking out. So what we're going to do is that we're going to write some code, just a few lines of code that will allow us to actually reduce all these fields and make something that is very simple, straight forward to the point and have a clean checkout process. So let's dive into the code. So what I'm going to do is I'm just going to copy one of these plugins that we had made before and I'm going to call it a lab, a slim checkout, prefixing it with my name so we'll have that and what we're going to do is we're going to rename also this particular file that's inside. Call it that. So what we're going to do is just drag this and drop it into our editor. So we have slim checkout so I'm going to just get this and call this lab slim checkout process. So next what we're going to do is I just change this and just call it lab slim checkout and we shall just clean up this code here and take this out and just save. So come back into our plugin section, reload and we're actually going to have lab slim checkout process here and activate it. We have no errors and we're good to go. So what we're going to use is actually a very simple hook of wukamas and this time it's going to be add filter and now add filter, what add filter essentially does is edit content that is already existing on a page and it uses a function so we shall call this simplify checkout process and we shall wrap this in. This is going to be our function. So the hook that we're going to use or the filter hook that we're going to use is actually called wukamas checkout fields and essentially we'll just copy this. We'll just copy this function and then we'll start writing it's a function, the name put our brackets and then open and start. So what we can do here is we can actually just echo hello and see what's going to happen. So save this, come back to our front page on the reload area and we shall see that we actually have a halo here and we have something that's shouting at us that is an invalid argument supplied for each. The fields that are here actually you're seeing now we don't have our fields available here because this is breaking. So we're going to need to feed in something. So we know we're going to be feeding in the fields as our first argument and then at the end of the day we have to return those fields. So fields and save. So if we just come back and reload here we're going to find that all our fields that come by default are actually showing up. So now what we need to do is that we're going to edit those individual fields. So what I'm going to do is take out this halo and then I'm going to use PHP to unset the different fields. So we're going to use the unset function and we're going to say in each of the fields we want to get the billing and inside the area of billing we actually want to get the billing company billing underscore company and then we'll terminate that and save. So we're looking for the billing company and if we actually come and inspect this particular field we'll see that it has an ID of billing company. That's why we're using the ID. If we look at these other fields that we'll also unset for example the street address you'll see that it has billing address one and this is known as billing address two. So what we're going to do is we've already saved our code here. Let's just try to reload this page and see what will happen. So we're looking out for company name and now when we look we actually see that we don't have company name and this is not going to affect our checkout process at all because we are just tapping into the WooCamas and actually removing the different pieces. So what I'm going to do here is just to show you what actually is going under the covers what's going on. So we're going to just vadamp our fields that we get here before we unset anything we just need to see what's in fields. So if we reload that we'll see that we have four pieces of information we have another four so we have billing which has a billing first name that has a label of a first name. So we can actually tap into the individual pieces. So when we find out what's under the fields by vadampik we see that we have a lot of information so we have billing information we have things like the first name the billing company we have the billing country and we have if we scroll the way down we shall see that we also have things that are to do with shipping so we have a shipping first name and all of that when we turn on shipping in our WooCamas at the back end that allows us to use the shipping content on the front end for example if you scroll down you will not see all of that because we've by default WooCamas allows you to have your billing details to correspond with the shipping details so you might want to turn on that setting so what we're going to do is that we're going to also just unset a few other fields I'll comment this out so we're going to look for the billing address 1 and billing address 2 so I'll just copy we had billing company here so we had billing country I'll copy that too and just drop it here and we need to change this to address underscore 1 I'll copy that paste it here and then I'll just change this to 2 save and when I come back and reload we'll actually see that we no longer have the address that was being required of us so we need to take out a few other things for example the county since we don't use it so that's billing state the postal code we'll get the ID which is billing postal code so we're taking out a state postal code and phone for now let's see how that works out so we're going to also take out the city so billing city billing state and billing post code so let's do that 3 pieces here we need to take out the post code we need to take out the state and we are also going to take out post code state and then this is a city billing city so we'll take out the city too and save this and when we come back and reload we actually find that we only have 4 pieces of information that are required here so we have first name, last name, phone, address usually that's good enough to get your package delivered or even ask the customer where they would want this delivered so we've so we've got rid of all the information that we actually didn't need at that particular moment in our setup now what I want to do is just show you something that you can set variables to even this particular thing maybe you want to remove this field if only there were virtual products and so on so what you can do is you can tap and find out is this a virtual product that I would want to get rid of but simply by setting the fields you actually get what you want so this is how we remove fields in the next video I'll actually show you how you can also add other fields and customize this to your own need so thank you for watching and happy coding