woocommerce_correios_<id>_rate

The WooCommerce Correios woocommerce correios id rate hook.

Description

apply_filters( 'woocommerce_correios_<id>_rate', (callback) $array, (unknown) $this_instance_id, (unknown) $package ); 

Parameters (3)

0. $array — Optional. (callback) => array( 'id' => $this->id . $this->instance_id, 'label' => $label, 'cost' => (float) $cost + (float) $fee, )
The array.
1. $this_instance_id (unknown)
The this instance id.
2. $package (unknown)
The package.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_correios_{$id}_rate', $array, $this_instance_id, $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_<id>_rate callback 
  2. function filter_woocommerce_correios_id_rate( $array, $this_instance_id, $package ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "woocommerce_correios_{$id}_rate", 'filter_woocommerce_correios_id_rate', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "woocommerce_correios_{$id}_rate", 'filter_woocommerce_correios_id_rate', 10, 3 ); 

Defined (3)

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

/includes/abstracts/abstract-wc-correios-shipping.php  
  1. $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array( 
/includes/abstracts/abstract-wc-correios-shipping-international.php  
  1. $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array( 
/includes/abstracts/abstract-wc-correios-shipping-carta.php  
  1. $rate = apply_filters( 'woocommerce_correios_' . $this->id . '_rate', array(