wpml_object_id

The WooCommerce Extended Coupon Features wpml object id hook.

Description

apply_filters( 'wpml_object_id', (unknown) $object_id, (unknown) $object_type ); 

Parameters (2)

0. $object_id (unknown)
The object id.
1. $object_type (unknown)
The object type.

Usage

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

Defined (1)

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

/includes/wjecf-wpml.php  
  1. $translated_object_ids[] = apply_filters( 'wpml_object_id', $object_id, $object_type );