{"id":3931,"date":"2020-03-17T20:28:19","date_gmt":"2020-03-18T03:28:19","guid":{"rendered":"https:\/\/codedcommerce.com\/product\/import-placeholder-for-166\/"},"modified":"2023-10-08T19:23:20","modified_gmt":"2023-10-09T02:23:20","slug":"display-all-hooks","status":"publish","type":"woo-code","link":"https:\/\/codedcommerce.com\/woo\/display-all-hooks\/","title":{"rendered":"Display all hooks on a page"},"content":{"rendered":"\n<pre class=\"wp-block-code language-php\"><code>add_action( 'template_redirect', function() {\n\n\t\/\/ Isolate To One Page\n\tglobal $wp;\n\tif( empty( $wp->query_vars&#91;'order-received'] ) ) {\n\t\treturn;\n\t}\n\n\t\/\/ Hook All\n\tadd_action( 'all', function( $tag ) {\n\n\t\t\/\/ Avoid The Admin Area\n\t\tif( is_admin() ) {\n\t\treturn;\n\t\t}\n\n\t\t\/\/ Only Woo Core Hooks\n\t\tif( substr( $tag, 0, 12 ) == 'woocommerce_' ) {\n\n\t\t\t\/\/ Print The Hook\n\t\t\techo $tag . ' ';\n\t\t}\n\n\t} );\n\n} );<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-3931","woo-code","type-woo-code","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/woo-code\/3931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/woo-code"}],"about":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/types\/woo-code"}],"wp:attachment":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/media?parent=3931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}