active_plugins
The WooCommerce Hide Checkout Shipping Address active plugins hook.
Description
Parameters (1)
- 0. $get_option (unknown) =>
get_option( 'active_plugins' )
- 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 (2)
The filter is defined in the following location(s).
- /woocommerce-hide-checkout-shipping-address.php
- if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && function_exists( 'WC' ) && ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, self::WC_REQUIRED_VERSION, '>=' ) ) ) {
- } elseif ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {