woocommerce_correios_international_shipping_args

The WooCommerce Correios woocommerce correios international shipping args hook.

Description

apply_filters( 'woocommerce_correios_international_shipping_args', (callback) $array, (unknown) $this_id, (unknown) $this_package ); 

Parameters (3)

0. $array — Optional. (callback) => array( 'tipoConsulta' => 'Geral', 'especif' => $this->service, 'uforigem' => $this->get_origin_state(), 'localidade' => $this->get_origin_location(), 'pais' => $this->get_destination_country(), 'altura' => $this->get_height(), 'largura' => $this->get_width(), 'profundidade' => $this->get_length(), 'peso' => $this->get_weight(), 'reset' => 'true', )
The array.
1. $this_id (unknown)
The this id.
2. $this_package (unknown)
The this package.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_correios_international_shipping_args', $array, $this_id, $this_package ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_correios_international_shipping_args callback 
  2. function filter_woocommerce_correios_international_shipping_args( $array, $this_id, $this_package ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_correios_international_shipping_args', 'filter_woocommerce_correios_international_shipping_args', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_correios_international_shipping_args', 'filter_woocommerce_correios_international_shipping_args', 10, 3 ); 

Defined (1)

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

/includes/class-wc-correios-webservice-international.php  
  1. $args = apply_filters( 'woocommerce_correios_international_shipping_args', array(