{"id":598,"date":"2024-07-19T12:36:38","date_gmt":"2024-07-19T12:36:38","guid":{"rendered":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/?p=598"},"modified":"2024-07-19T12:36:39","modified_gmt":"2024-07-19T12:36:39","slug":"actions","status":"publish","type":"post","link":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/","title":{"rendered":"Actions"},"content":{"rendered":"<div id=\"yith-hooks_container\" class=\"actions\"><h3>functions.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_ywbc_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>Adds an action when initializing the plugin<\/p>\n<hr \/>\n<h3>includes\/class-yith-ywbc-shortcodes.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_wcbc_set_barcode_status_for_order\" 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>Adds an action when setting the barcode status for the order<\/p>\n<pre>\n<b>Params<\/b>\n<code> $id              $_POST['id'].<\/code>\n<code> $status          $_POST['status'].<\/code>\n<code> $type            $_POST['type'].<\/code>\n<code> $barcode_actions $_POST['barcode-actions'].<\/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_wcbc_set_barcode_status_for_product\" 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>Adds an action when setting the barcode status for the product<\/p>\n<pre>\n<b>Params<\/b>\n<code> $id              $_POST['id'].<\/code>\n<code> $status          $_POST['status'].<\/code>\n<code> $type            $_POST['type'].<\/code>\n<code> $barcode_actions $_POST['barcode-actions'].<\/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_barcode_before_load_template_barcode_actions\" 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>Adds an action before loading the template of the barcode actions<\/p>\n<pre>\n<b>Params<\/b>\n<code> $items $this->barcode_action_search.<\/code>\n<\/pre>\n<hr \/>\n<h3>includes\/class-yith-ywbc-frontend.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_ywbc_after_generate_barcode\" 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>Adds an action after generating the barcode image<\/p>\n<pre>\n<b>Params<\/b>\n<code> $object_id ID of the barcode.<\/code>\n<code> $protocol  Protocol.<\/code>\n<code> $value     Value.<\/code>\n<\/pre>\n<hr \/>\n<h3>includes\/class-yith-ywbc-backend.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_ywbc_after_generate_barcode\" 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>Adds an action after generating the barcode image<\/p>\n<pre>\n<b>Params<\/b>\n<code> $object_id ID of the barcode.<\/code>\n<code> $protocol  Protocol.<\/code>\n<code> $value     Value.<\/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_ywbc_after_write_mpdf_html_template_pdf\" 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>Adds an action after write the HTML template PDF<\/p>\n<pre>\n<b>Params<\/b>\n<code> $mpdf MPDF instance.<\/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_ywbc_after_generate_template_pdf\" 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>Adds an action after write the template PDF<\/p>\n<pre>\n<b>Params<\/b>\n<code> $mpdf MPDF instance.<\/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_ywbc_after_write_mpdf_html_template_pdf\" 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>Adds an action after write the HTML template PDF<\/p>\n<pre>\n<b>Params<\/b>\n<code> $mpdf MPDF instance.<\/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_ywbc_after_generate_template_pdf\" 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>Adds an action after write the template PDF<\/p>\n<pre>\n<b>Params<\/b>\n<code> $mpdf MPDF instance.<\/code>\n<\/pre>\n<hr \/>\n<h3>includes\/class-yith-barcode.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_ywbc_qrcode_object_before_generate_image\" 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>Adds an action before generating the image of the qr code in creation<\/p>\n<pre>\n<b>Params<\/b>\n<code> $qr_code Qr object.<\/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":[11],"tags":[],"class_list":["post-598","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 Barcodes and QR Codes: 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-barcodes\/development\/actions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YITH Barcodes and QR Codes: Actions\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/\" \/>\n<meta property=\"og:site_name\" content=\"YITH WooCommerce Barcodes\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-19T12:36:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-19T12:36:39+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-barcodes\/development\/actions\/\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/\",\"name\":\"YITH Barcodes and QR Codes: Actions\",\"isPartOf\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#website\"},\"datePublished\":\"2024-07-19T12:36:38+00:00\",\"dateModified\":\"2024-07-19T12:36:39+00:00\",\"author\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3\"},\"breadcrumb\":{\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Actions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#website\",\"url\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/\",\"name\":\"YITH WooCommerce Barcodes\",\"description\":\"Plugin documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/?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-barcodes\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3\",\"name\":\"armando\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#\/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-barcodes\/author\/armando\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YITH Barcodes and QR Codes: 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-barcodes\/development\/actions\/","og_locale":"en_US","og_type":"article","og_title":"YITH Barcodes and QR Codes: Actions","og_url":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/","og_site_name":"YITH WooCommerce Barcodes","article_published_time":"2024-07-19T12:36:38+00:00","article_modified_time":"2024-07-19T12:36:39+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-barcodes\/development\/actions\/","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/","name":"YITH Barcodes and QR Codes: Actions","isPartOf":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#website"},"datePublished":"2024-07-19T12:36:38+00:00","dateModified":"2024-07-19T12:36:39+00:00","author":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3"},"breadcrumb":{"@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/development\/actions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/"},{"@type":"ListItem","position":2,"name":"Actions"}]},{"@type":"WebSite","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#website","url":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/","name":"YITH WooCommerce Barcodes","description":"Plugin documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/?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-barcodes\/#\/schema\/person\/c617ea3a2e5ee161586c2bc0d367ffe3","name":"armando","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/#\/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-barcodes\/author\/armando\/"}]}},"_links":{"self":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/posts\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/comments?post=598"}],"version-history":[{"count":1,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/posts\/598\/revisions"}],"predecessor-version":[{"id":599,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/posts\/598\/revisions\/599"}],"wp:attachment":[{"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/media?parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/categories?post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.yithemes.com\/yith-woocommerce-barcodes\/wp-json\/wp\/v2\/tags?post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}