active_plugins
The WooCommerce Sales By Location Report active plugins hook.
Description
apply_filters( 'active_plugins', $get_option );
Parameters (1)
- 0. $get_option
- The get option.
Usage
- To run the hook, copy the example below.
- $get_option = apply_filters( 'active_plugins', $get_option );
- if ( !empty( $get_option ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the active_plugins callback
- function filter_active_plugins( $get_option ) {
- // make filter magic happen here...
- return $get_option;
- };
- // add the filter
- add_filter( 'active_plugins', 'filter_active_plugins', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'active_plugins', 'filter_active_plugins', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /woocommerce-location-report.php
- if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {