woocommerce_settings_rest_api filter-hookWC 3.4.0

Filter the settings rendered in the Legacy API section of the Advanced settings tab.

Core no longer ships any settings in this section; the section itself is only registered when at least one callback is hooked into this filter.

Usage

add_filter( 'woocommerce_settings_rest_api', 'wp_kama_woocommerce_settings_rest_api_filter' );

/**
 * Function for `woocommerce_settings_rest_api` filter-hook.
 * 
 * @param array $settings Settings array. Empty by default.
 *
 * @return array
 */
function wp_kama_woocommerce_settings_rest_api_filter( $settings ){

	// filter...
	return $settings;
}
$settings(array)
Settings array. Empty by default.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

WC_Settings_Advanced::get_settings_for_legacy_api_section()
woocommerce_settings_rest_api
woocommerce/includes/admin/settings/class-wc-settings-advanced.php 425
return apply_filters( 'woocommerce_settings_rest_api', array() );

Where the hook is used in WooCommerce

Usage not found.