woocommerce_skip_legacy_rest_api_plugin_auto_install хук-фильтрWC 8.8.0

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.

Использование

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".

Список изменений

С версии 8.8.0 Введена.

Где вызывается хук

WC_Install::maybe_install_legacy_api_plugin()
woocommerce_skip_legacy_rest_api_plugin_auto_install
woocommerce/includes/class-wc-install.php 1274
if ( apply_filters( 'woocommerce_skip_legacy_rest_api_plugin_auto_install', $previously_installed_by_us ) ) {

Где используется хук в WooCommerce

Использование не найдено.