There are no pre-requisites in order for you to be able to implement this solution.
Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.
Need support with the snippet? We’re Here to Help You, Contact Us!
Enabling and disabling shipping method options based on whether the user is logged into their account is easy. Having this code snippet implemented can encourage the user to register an account with your store if it means they get an exclusive shipping option. This guide shows you how you can enable free shipping only for users which are logged in to their account. That means users have have not registered an account and logged in will not see the free shipping option at the checkout. What better incentive to get your users to register with your online store? The only thing you’ll need to tweak in this code is the shipping method radio button value which is explained further in the guide.
Use your browser’s developer tools (usually F12 on the keyboard) then use the inspect element tool and click on the radio button you’d like to enable/disable. Expand the list until you see the value you’d like. It typically includes a colon and a number as shown in the image.
Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.