Warning: include_once(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php on line 22

Warning: include(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 137

Warning: include(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 137

Warning: include_once(/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 174

Warning: include_once(): Failed opening '/home4/aquapan/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/revela25/public_html/cjbarnaby/wp-content/plugins/wp-super-cache/wp-cache.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/revela25/public_html/cjbarnaby/wp-content/advanced-cache.php:22) in /home/revela25/public_html/cjbarnaby/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":3997,"date":"2023-03-07T01:38:24","date_gmt":"2023-03-07T01:38:24","guid":{"rendered":"http:\/\/cjbarnaby.com\/?p=3997"},"modified":"2023-03-07T01:38:59","modified_gmt":"2023-03-07T01:38:59","slug":"bulk-move-woocommerce-categories-under-specific-parent","status":"publish","type":"post","link":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/","title":{"rendered":"Bulk Move Woocommerce Categories Under Specific Parent"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\tUse at your own risk.\r\n\r\nIf you don’t know where this goes you should not be even attempting to use this.\r\n\r\n \r\n\r\n \t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\n\/\/\/ bulk move under a specific category parent by ID's\n\nfunction bulk_set_product_category_parent() {\n    $parent_category_id = 149; \/\/ Replace with the ID of the parent category\n    $args = array(\n        'taxonomy' => 'product_cat',\n        'hide_empty' => false,\n        'include' => range(184, 200), \/\/ Range of category IDs to update\n    );\n\n    $categories = get_categories($args);\n\n    foreach ($categories as $category) {\n        $category_id = $category->term_id;\n        wp_update_term($category_id, 'product_cat', array(\n            'parent' => $parent_category_id,\n        ));\n    }\n}\n\nadd_action('admin_init', 'bulk_set_product_category_parent');\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Use at your own risk. If you don&#8217;t know where this goes you should not be even attempting to use this. &nbsp; &nbsp; \/\/\/ bulk move under a specific category parent by ID&#8217;s function bulk_set_product_category_parent() { $parent_category_id = 149; \/\/ Replace with the ID of the parent category $args = array( &#8216;taxonomy&#8217; => &#8216;product_cat&#8217;, &#8216;hide_empty&#8217; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,3137],"tags":[],"class_list":["post-3997","post","type-post","status-publish","format-standard","hentry","category-attachments","category-woocommerce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby\" \/>\n<meta property=\"og:description\" content=\"Use at your own risk. If you don&#8217;t know where this goes you should not be even attempting to use this. &nbsp; &nbsp; \/\/\/ bulk move under a specific category parent by ID&#039;s function bulk_set_product_category_parent() { $parent_category_id = 149; \/\/ Replace with the ID of the parent category $args = array( &#039;taxonomy&#039; =&gt; &#039;product_cat&#039;, &#039;hide_empty&#039; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/\" \/>\n<meta property=\"og:site_name\" content=\"cjbarnaby\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-07T01:38:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-07T01:38:59+00:00\" \/>\n<meta name=\"author\" content=\"cjbarnaby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cjbarnaby\" \/>\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\":\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/\",\"url\":\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/\",\"name\":\"Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby\",\"isPartOf\":{\"@id\":\"http:\/\/cjbarnaby.com\/#website\"},\"datePublished\":\"2023-03-07T01:38:24+00:00\",\"dateModified\":\"2023-03-07T01:38:59+00:00\",\"author\":{\"@id\":\"http:\/\/cjbarnaby.com\/#\/schema\/person\/c480873ae8f074e8a2ba01f1e7c020f7\"},\"breadcrumb\":{\"@id\":\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/cjbarnaby.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bulk Move Woocommerce Categories Under Specific Parent\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/cjbarnaby.com\/#website\",\"url\":\"http:\/\/cjbarnaby.com\/\",\"name\":\"cjbarnaby\",\"description\":\"life attachments = temporal meaning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/cjbarnaby.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/cjbarnaby.com\/#\/schema\/person\/c480873ae8f074e8a2ba01f1e7c020f7\",\"name\":\"cjbarnaby\",\"url\":\"http:\/\/cjbarnaby.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby","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":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/","og_locale":"en_US","og_type":"article","og_title":"Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby","og_description":"Use at your own risk. If you don&#8217;t know where this goes you should not be even attempting to use this. &nbsp; &nbsp; \/\/\/ bulk move under a specific category parent by ID's function bulk_set_product_category_parent() { $parent_category_id = 149; \/\/ Replace with the ID of the parent category $args = array( 'taxonomy' => 'product_cat', 'hide_empty' [&hellip;]","og_url":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/","og_site_name":"cjbarnaby","article_published_time":"2023-03-07T01:38:24+00:00","article_modified_time":"2023-03-07T01:38:59+00:00","author":"cjbarnaby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cjbarnaby","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/","url":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/","name":"Bulk Move Woocommerce Categories Under Specific Parent - cjbarnaby","isPartOf":{"@id":"http:\/\/cjbarnaby.com\/#website"},"datePublished":"2023-03-07T01:38:24+00:00","dateModified":"2023-03-07T01:38:59+00:00","author":{"@id":"http:\/\/cjbarnaby.com\/#\/schema\/person\/c480873ae8f074e8a2ba01f1e7c020f7"},"breadcrumb":{"@id":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/cjbarnaby.com\/bulk-move-woocommerce-categories-under-specific-parent\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/cjbarnaby.com\/"},{"@type":"ListItem","position":2,"name":"Bulk Move Woocommerce Categories Under Specific Parent"}]},{"@type":"WebSite","@id":"http:\/\/cjbarnaby.com\/#website","url":"http:\/\/cjbarnaby.com\/","name":"cjbarnaby","description":"life attachments = temporal meaning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/cjbarnaby.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/cjbarnaby.com\/#\/schema\/person\/c480873ae8f074e8a2ba01f1e7c020f7","name":"cjbarnaby","url":"http:\/\/cjbarnaby.com\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/posts\/3997"}],"collection":[{"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/comments?post=3997"}],"version-history":[{"count":5,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/posts\/3997\/revisions"}],"predecessor-version":[{"id":4002,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/posts\/3997\/revisions\/4002"}],"wp:attachment":[{"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/media?parent=3997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/categories?post=3997"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cjbarnaby.com\/wp-json\/wp\/v2\/tags?post=3997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}