Restricting pertain products in the catalog based off their post code. WooCommerce Catalog Visibility Options plugin on woocommerce

Question

I’m a beginner to php and I’m trying to edit the code in a woocommerce plugin called Catalog Visibility options. The plugin is used to restrict the visibility of certain products in the store depending on the country or state/region the user is located at. I would like to change the visibility options based off the post code of the user as opposed to country or state/region. I tried to look into the php code and found this line

array(
                    'name'    => __( 'Location Filter Type', 'wc_catalog_restrictions' ),
                    'desc'    => '',
                    'css'     => 'min-width:300px;',
                    'id'      => '_wc_restrictions_locations_type',
                    'type'    => 'select',
                    'std'     => 'countries',
                    'default' => 'countries',
                    'class'   => 'chosen_select',
                    'options' => array( 'countries' => 'Countries', 'states' => 'States / Territories' )

),

What I would like to know is where the last line of that code is used so I could possibly add some code that can help me display products based off their post code. I know this question is very specific and someone who uses the plugin would probably be the ideal person who can help me.

0
Peter Parker 2 years 2020-10-24T02:10:24-05:00 0 Answers 10 views 0

Leave an answer

Browse
Browse