woocommerce_skip_legacy_rest_api_plugin_auto_install
Filter to skip the automatic installation of the WooCommerce Legacy REST API plugin from the WordPress.org plugins directory.
By default, this is true (skip installation) if we have a record of previously installing the legacy plugin, and false (do not skip) if we have no record of previously installing the plugin.
Usage
add_filter( 'woocommerce_skip_legacy_rest_api_plugin_auto_install', 'wp_kama_woocommerce_skip_legacy_rest_api_plugin_auto_install_filter' ); /** * Function for `woocommerce_skip_legacy_rest_api_plugin_auto_install` filter-hook. * * @param bool $skip_auto_install False, defaulting to "don't skip the plugin automatic installation". * * @return bool */ function wp_kama_woocommerce_skip_legacy_rest_api_plugin_auto_install_filter( $skip_auto_install ){ // filter... return $skip_auto_install; }
- $skip_auto_install(true|false)
- False, defaulting to "don't skip the plugin automatic installation".
Changelog
Since 8.8.0 | Introduced. |
Where the hook is called
woocommerce_skip_legacy_rest_api_plugin_auto_install
woocommerce/includes/class-wc-install.php 1276
if ( apply_filters( 'woocommerce_skip_legacy_rest_api_plugin_auto_install', $previously_installed_by_us ) ) {