Hello, thanks. Been so slow in pushing an update😹, my bad.
It actuaLly didn’t occur to me to add this to custom filtering
https://gist.github.com/Preciousomonze/03c54e7e0cc0e11ca709832bc757810b
That’s a list of all filter hooks and how to implement, for customisation.
Although Prefered country isn’t on the list.
I’ll be doing an update to include that(I’ll be faster this time around 🌝).
For the mean time you can edit the frontend.js (if you have script_debug turned on, this is the file called) or frontend.min.Js file.
So I’ll advice you edit the frontend.js on line 21 after separateDialCode: separateDialCode, you add your prefered countries code there.
To update frontend.min.js, you have to minify your new frontend.js.
I am assuming you have a Javascript coding background. If not l, you can wait for an update.
Thank you for the elaborate response, much appreciated!
I’m unfortunately not experienced enough with JavaScript to do this, so will look forward to the update. 🙂
Hello, theres a new update.
Update to the latest version, after that:
function pekky_cx_preferred_countries( $countries ){
$countries = array('ng','gh','es');
return $countries;
}
add_filter( 'wc_pv_preferred_countries', 'pekky_cx_preferred_countries' );
replace the countries to suite your need, add to your functions.php
Marking this as resolved!
And Please do not forget to rate 🤩🥺
Do have a nice day and don’t forget to try out pancakes! 💪🥞
That’s fantastic! Added and tweaked the code, it works perfectly!
I’ll be sure to rate the plugin, thank you so much! 🙂
#Pancakes ❤️