Question API
-
Hi,
I was just wondering whether Woocommerce is using the same Rest-API as WordPress, or if it is a different one. The reason is that I would like to clean up the header links that WP has set, and I would like to add
remove_action('wp_head', 'rest_output_link_wp_head'); remove_action('wp_head', 'wp_oembed_add_discovery_links'); remove_action('template_redirect', 'rest_output_link_header', 11, 0); function remove_json_api () { remove_action('wp_head', 'rest_output_link_wp_head', 10); remove_action('wp_head', 'wp_oembed_add_discovery_links', 10); remove_action('rest_api_init', 'wp_oembed_register_route'); add_filter('embed_oembed_discover', '__return_false'); remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10); remove_action('wp_head', 'wp_oembed_add_discovery_links'); remove_action('wp_head', 'wp_oembed_add_host_js'); add_filter('rewrite_rules_array', 'disable_embeds_rewrites'); } add_action('after_setup_theme', 'remove_json_api');
and I am wondering if this would affect Woocommerce in any way since I do need Woocommerce’s REST-API to work.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Question API’ is closed to new replies.