Hello @goradagency,
Let’s say that you want to remove the governorates Abqaiq and Dammam from the Eastern Province Region.
You can do it by adding this code snippet to the functions.php
file of your current child theme, a custom functions plugin or using the Code Snippets plugin:
/**
* Remove Governorates from the Eastern Province Region
*/
add_filter('scpwoo_custom_places_sa', 'scpwoo_remove_governorates_sa');
function scpwoo_remove_governorates_sa( $places ){
global $places;
// Eastern Province Region
unset($places['SA']['SA-04'][0]); //Abqaiq
unset($places['SA']['SA-04'][3]); //Dammam
return $places['SA'];
}
The [0]
and [3]
above, after $places['SA']['SA-04']
, corresponds to the position of the governorates (counting starts from 0). See the Governorates of Eastern Province Region.
Let me know if it works!
I’m glad to know it worked!
If you don’t mind and have the time, do you think you could leave us a review?
Thanks in advance and all the best with your store!