{"id":6750,"date":"2023-04-18T21:27:40","date_gmt":"2023-04-18T21:27:40","guid":{"rendered":"https:\/\/www.kadencewp.com\/help-center\/?post_type=docs&#038;p=6750"},"modified":"2025-09-09T18:57:46","modified_gmt":"2025-09-09T18:57:46","password":"","slug":"woo-template-block-product-custom-action","status":"publish","type":"docs","link":"https:\/\/www.kadencewp.com\/help-center\/docs\/kadence-shop-kit\/woo-template-block-product-custom-action\/","title":{"rendered":"Woo Template Block &#8211; Product: Custom Actions"},"content":{"rendered":"\n<p>The Product: Custom Actions block allows you to add a Custom Do Action or a Custom Do Function to your product pages. This feature can be used for integrating with 3rd party plugins or just for adding custom functions to the product page.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"631\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-1024x631.jpg\" alt=\"\" class=\"wp-image-6752\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-1024x631.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-300x185.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-768x473.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-360x222.jpg 360w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-1536x946.jpg 1536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/CustomActions-2048x1261.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\">The Product: Custom Actions block can be found under the Woo Template Blocks section of the Block Selector.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock-436x1024.jpg\" alt=\"\" class=\"wp-image-6753\" width=\"264\" height=\"620\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock-436x1024.jpg 436w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock-128x300.jpg 128w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock-218x512.jpg 218w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock-654x1536.jpg 654w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/selectcustomactionblock.jpg 691w\" sizes=\"auto, (max-width: 264px) 100vw, 264px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" style=\"padding-top:var(--wp--preset--spacing--60)\">Block Settings<\/h2>\n\n\n\n<p>You can customize your Product: Custom Actions Block using the Block Settings.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-1024x529.jpg\" alt=\"\" class=\"wp-image-6754\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-1024x529.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-300x155.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-768x397.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-360x186.jpg 360w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-1536x794.jpg 1536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Block-Settings-2048x1058.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60);padding-right:0;padding-bottom:0;padding-left:0\"><strong>General Settings &#8211;<\/strong> Here, you can set the Custom Type as a Do Function or a Do Action. Then in the Custom Action\/Function field, you can call that action.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/generalsettings.jpg\" alt=\"\" class=\"wp-image-6755\" width=\"298\" height=\"230\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/generalsettings.jpg 552w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/generalsettings-300x232.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/generalsettings-360x278.jpg 360w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\">For example, you can add this <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippet<\/a> to your website<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">function custom_snippet_example() {\n\techo '&lt;h1 style=\"color:white;background:black;\"&gt;Hello!&lt;\/h1&gt;';\n}<\/pre>\n\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\">Then you can call this action by using these Block Settings.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/samplea.jpg\" alt=\"\" class=\"wp-image-6756\" width=\"272\" height=\"137\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/samplea.jpg 536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/samplea-300x151.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/samplea-360x181.jpg 360w\" sizes=\"auto, (max-width: 272px) 100vw, 272px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\">The results will look like this.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-1024x645.jpg\" alt=\"\" class=\"wp-image-6757\" width=\"570\" height=\"359\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-1024x645.jpg 1024w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-300x189.jpg 300w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-768x484.jpg 768w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-360x227.jpg 360w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-1536x967.jpg 1536w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/04\/Sample-B-2048x1290.jpg 2048w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\"><strong>Spacing Settings &#8211; <\/strong>The Spacing Settings allow you to add padding and margin for desktop, tablet, and mobile devices.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Product-Brand-Spacing.png\" alt=\"Product Brand Spacing\" class=\"wp-image-6444\" width=\"292\" height=\"267\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Product-Brand-Spacing.png 546w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Product-Brand-Spacing-300x275.png 300w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/figure><\/div>\n\n\n<p style=\"padding-top:var(--wp--preset--spacing--60)\"><strong>Advanced Settings &#8211;<\/strong> The Advanced Settings allow you to add a Custom CSS Class to your block.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Main-Query-Advanced-Settings.png\" alt=\"Main Query Advanced Settings\" class=\"wp-image-6429\" width=\"354\" height=\"186\" srcset=\"https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Main-Query-Advanced-Settings.png 544w, https:\/\/www.kadencewp.com\/help-center\/wp-content\/uploads\/sites\/14\/2023\/02\/Main-Query-Advanced-Settings-300x158.png 300w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>The Product: Custom Actions block allows you to add a Custom Do Action or a Custom Do Function to your product pages. This feature can be used for integrating with 3rd party plugins or just for adding custom functions to the product page. The Product: Custom Actions block can be found under the Woo Template&#8230;<\/p>\n","protected":false},"author":148263,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_category":[428],"doc_tag":[],"knowledge_base":[9],"class_list":["post-6750","docs","type-docs","status-publish","hentry","doc_category-woo-template-blocks","knowledge_base-kadence-shop-kit"],"year_month":"2026-04","word_count":188,"total_views":"3827","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"victormonk","author_link":"https:\/\/www.kadencewp.com\/help-center\/author\/victormonk\/"},"doc_category_info":[{"term_name":"Woo Template Blocks","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-shop-kit\/woo-template-blocks\/"}],"doc_tag_info":[],"knowledge_base_info":[{"term_name":"Kadence Shop Kit","term_url":"https:\/\/www.kadencewp.com\/help-center\/knowledge-base\/kadence-shop-kit\/","term_slug":"kadence-shop-kit"}],"knowledge_base_slug":["kadence-shop-kit"],"taxonomy_info":{"doc_category":[{"value":428,"label":"Woo Template Blocks"}],"knowledge_base":[{"value":9,"label":"Kadence Shop Kit"}]},"featured_image_src_large":false,"comment_info":0,"_links":{"self":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/6750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/users\/148263"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/comments?post=6750"}],"version-history":[{"count":7,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/6750\/revisions"}],"predecessor-version":[{"id":14743,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/docs\/6750\/revisions\/14743"}],"wp:attachment":[{"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/media?parent=6750"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_category?post=6750"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/doc_tag?post=6750"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/www.kadencewp.com\/help-center\/wp-json\/wp\/v2\/knowledge_base?post=6750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}