wcml_register_endpoints_query_vars

The WooCommerce Multilingual wcml register endpoints query vars hook.

Description

apply_filters( 'wcml_register_endpoints_query_vars', (unknown) $query_vars, (unknown) $wc_vars, (unknown) $instance ); 

Parameters (3)

0. $query_vars (unknown)
The query vars.
1. $wc_vars (unknown)
The wc vars.
2. $instance (unknown)
The instance.

Usage

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

Defined (1)

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

/inc/class-wcml-endpoints.php  
  1. $query_vars = apply_filters( 'wcml_register_endpoints_query_vars', $query_vars, $wc_vars, $this );