wc_rejoiner_cart_item_variant
The WooCommerce Rejoiner wc rejoiner cart item variant hook.
Description
Parameters (1)
- 0. $variantname (string)
- The variantname.
Usage
- To run the hook, copy the example below.
- $variantname = apply_filters( 'wc_rejoiner_cart_item_variant', $variantname );
- if ( !empty( $variantname ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wc_rejoiner_cart_item_variant callback
- function filter_wc_rejoiner_cart_item_variant( $variantname ) {
- // make filter magic happen here...
- return $variantname;
- };
- // add the filter
- add_filter( 'wc_rejoiner_cart_item_variant', 'filter_wc_rejoiner_cart_item_variant', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wc_rejoiner_cart_item_variant', 'filter_wc_rejoiner_cart_item_variant', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /includes/class-wc-rejoiner.php
- $variant = apply_filters( 'wc_rejoiner_cart_item_variant', $variantname );