wc_correios_get_address_by_postcode

Get address by postcode.

Description

wc_correios_get_address_by_postcode( (string) $postcode ); 

Parameters (1)

0. $postcode (string)
The postcode.

Usage

  1. if ( !function_exists( 'wc_correios_get_address_by_postcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-correios/includes/wc-correios-functions.php'; 
  3.  
  4. // The postcode. 
  5. $postcode = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_correios_get_address_by_postcode($postcode); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-correios-functions.php  
  1. function wc_correios_get_address_by_postcode( $postcode ) { 
  2. return WC_Correios_Autofill_Addresses::get_address( $postcode );