Closed alekln closed 2 years ago
your code
`public function get_pickup_points($shipping_country_id) { $pickup_points = wp_remote_get(plugin_dir_url(FILE) . '../locations/locations' . $shipping_country_id . '.json');
return json_decode($pickup_points['body']);
} `
my suggestion
`public function get_pickup_points($shipping_country_id) {
$pickup_points = file_get_contents(plugin_dir_path(__FILE__) . '../locations/locations' . $shipping_country_id . '.json'); return json_decode($pickup_points);
}`
either it doesnt work on localhost
Issue fixed in #50
your code
`public function get_pickup_points($shipping_country_id) { $pickup_points = wp_remote_get(plugin_dir_url(FILE) . '../locations/locations' . $shipping_country_id . '.json');
} `
my suggestion
`public function get_pickup_points($shipping_country_id) {
}`
either it doesnt work on localhost