{"id":599,"date":"2024-10-08T12:32:25","date_gmt":"2024-10-08T12:32:25","guid":{"rendered":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/?p=599"},"modified":"2024-10-08T12:32:25","modified_gmt":"2024-10-08T12:32:25","slug":"actions","status":"publish","type":"post","link":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/","title":{"rendered":"Actions"},"content":{"rendered":"<div id=\"yith-hooks_container\" class=\"actions\"><h3>includes\/class-yith-wcbr-shortcode-premium.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_before_shortcode\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to fire some action before shortcode handling<\/p>\n<pre>\n<b>Params<\/b>\n<code> string $shortcode Shortcode name<\/code>\n<code> array  $atts      Shortcode attributes<\/code>\n<\/pre>\n<hr \/>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_after_shortcode\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to fire some action after shortcode handling<\/p>\n<pre>\n<b>Params<\/b>\n<code> string $shortcode Shortcode name<\/code>\n<code> array  $atts      Shortcode attributes<\/code>\n<\/pre>\n<hr \/>\n<h3>includes\/class-yith-wcbr.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_enqueue_frontend_style\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to fire some action before enqueueing the plugin style<\/p>\n<hr \/>\n<h3>includes\/importer\/class-yith-wcbr-csv-importer.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_csv_importer_extra_field\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to manage some extra fields in the CSV import<\/p>\n<pre>\n<b>Params<\/b>\n<code> string $row    Import row<\/code>\n<code> string $header Import header<\/code>\n<code> array  $id     Term data<\/code>\n<\/pre>\n<hr \/>\n<h3>init.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_init\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows the plugin initialization<\/p>\n<hr \/>\n<h3>templates\/loop-brands.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_no_brand_logo\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to render some content or fire some action when the brand has no logo<\/p>\n<pre>\n<b>Params<\/b>\n<code> int     $term_id         Term ID<\/code>\n<code> WP_Term $term            Term object<\/code>\n<code> string  $image_size      Image size<\/code>\n<code> bool    $show_term_name  Whether to show the brand name<\/code>\n<code> bool    $show_avg_rating Whether to show the brand rating<\/code>\n<\/pre>\n<hr \/>\n<h3>templates\/shortcodes\/brand-grid-loop.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_no_brand_logo\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to render some content or fire some action when the brand has no logo<\/p>\n<pre>\n<b>Params<\/b>\n<code> int     $term_id         Term ID<\/code>\n<code> WP_Term $term            Term object<\/code>\n<code> string  $image_size      Image size<\/code>\n<code> bool    $show_term_name  Whether to show the brand name<\/code>\n<code> bool    $show_avg_rating Whether to show the brand rating<\/code>\n<\/pre>\n<hr \/>\n<h3>templates\/shortcodes\/brand-thumbnail-carousel.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_no_brand_logo\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to render some content or fire some action when the brand has no logo<\/p>\n<pre>\n<b>Params<\/b>\n<code> int     $term_id         Term ID<\/code>\n<code> WP_Term $term            Term object<\/code>\n<code> string  $image_size      Image size<\/code>\n<code> bool    $show_term_name  Whether to show the brand name<\/code>\n<code> bool    $show_avg_rating Whether to show the brand rating<\/code>\n<\/pre>\n<hr \/>\n<h3>templates\/shortcodes\/brand-thumbnail.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_no_brand_logo\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to render some content or fire some action when the brand has no logo<\/p>\n<pre>\n<b>Params<\/b>\n<code> int     $term_id         Term ID<\/code>\n<code> WP_Term $term            Term object<\/code>\n<code> string  $image_size      Image size<\/code>\n<code> bool    $show_term_name  Whether to show the brand name<\/code>\n<code> bool    $show_avg_rating Whether to show the brand rating<\/code>\n<\/pre>\n<hr \/>\n<h3>templates\/single-product-brands.php<\/h3>\n\t<div id=\"yith-hd-copy-to-clipboard-wrapper\">\n\t\t<div class=\"yith-hd-copy-to-clipboard_field-wrap\">\n\t\t\t<input type=\"text\" id=\"yith-hd_code\" class=\"yith-hd-copy-to-clipboard__field\" value=\" yith_wcbr_no_brand_logo\" readonly=\"\">\n\t\t\t<div class=\"yith-hd-copy-to-clipboard__tip\">Copied!<\/div>\n\t\t<\/div>\n\t\t<div class=\"yith-hd-copy-to-clipboard__copy\">\n\t\t\t<i class=\"yith-hd-copy-to-clipboard__copy__icon yith-icon yith-icon-copy\"><\/i>\n\t\t\t<span class=\"yith-hd-copy-to-clipboard__copy__text\">Copy<\/span>\n\t\t<\/div>\n\t<\/div>\n<p>Allows to render some content or fire some action when the brand has no logo<\/p>\n<pre>\n<b>Params<\/b>\n<code> int     $term_id         Term ID<\/code>\n<code> WP_Term $term            Term object<\/code>\n<code> string  $image_size      Image size<\/code>\n<code> bool    $show_term_name  Whether to show the brand name<\/code>\n<code> bool    $show_avg_rating Whether to show the brand rating<\/code>\n<\/pre>\n<hr \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":20,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-599","post","type-post","status-publish","format-standard","hentry","category-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>YITH Brands Add-On: Actions<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YITH Brands Add-On: Actions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/\" \/>\n<meta property=\"og:site_name\" content=\"YITH WooCommerce Brands Add-On\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-08T12:32:25+00:00\" \/>\n<meta name=\"author\" content=\"armando\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"armando\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/\",\"name\":\"YITH Brands Add-On: Actions\",\"isPartOf\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#website\"},\"datePublished\":\"2024-10-08T12:32:25+00:00\",\"author\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3\"},\"breadcrumb\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Actions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#website\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/\",\"name\":\"YITH WooCommerce Brands Add-On\",\"description\":\"Plugin documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3\",\"name\":\"armando\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6020f46edbc3814f7508e28543747a01?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6020f46edbc3814f7508e28543747a01?s=96&d=mm&r=g\",\"caption\":\"armando\"},\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/author\/armando\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YITH Brands Add-On: Actions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/","og_locale":"en_US","og_type":"article","og_title":"YITH Brands Add-On: Actions","og_url":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/","og_site_name":"YITH WooCommerce Brands Add-On","article_published_time":"2024-10-08T12:32:25+00:00","author":"armando","twitter_card":"summary_large_image","twitter_misc":{"Written by":"armando","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/","name":"YITH Brands Add-On: Actions","isPartOf":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#website"},"datePublished":"2024-10-08T12:32:25+00:00","author":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3"},"breadcrumb":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/development\/actions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/"},{"@type":"ListItem","position":2,"name":"Actions"}]},{"@type":"WebSite","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#website","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/","name":"YITH WooCommerce Brands Add-On","description":"Plugin documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3","name":"armando","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6020f46edbc3814f7508e28543747a01?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6020f46edbc3814f7508e28543747a01?s=96&d=mm&r=g","caption":"armando"},"url":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/author\/armando\/"}]}},"_links":{"self":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/posts\/599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/comments?post=599"}],"version-history":[{"count":1,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/posts\/599\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/posts\/599\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/media?parent=599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/categories?post=599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-brands-add-on\/wp-json\/wp\/v2\/tags?post=599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}