{"id":418,"date":"2017-09-08T12:58:10","date_gmt":"2017-09-08T10:58:10","guid":{"rendered":"https:\/\/demos.welaunch.io\/woocommerce-product-accessories\/?post_type=faq&#038;p=418"},"modified":"2020-07-29T14:35:46","modified_gmt":"2020-07-29T12:35:46","slug":"change-product-accessories-position","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/change-product-accessories-position\/","title":{"rendered":"Change product accessories Position"},"content":{"rendered":"<p>Let&#8217;s say you want to show Optional and mandatory accessories before the related products and not at the bottom. Then you can use the following code inside your child theme functions.php:<\/p>\n<p>Mandatory accessories:<\/p>\n<pre>remove_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories-&gt;plugin_public, 'woocommerce_mandatory_accessories_display' ), 25 );\nadd_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories-&gt;plugin_public, 'woocommerce_mandatory_accessories_display' ), 5 );\n<\/pre>\n<p>Optional Accessories:<\/p>\n<pre>remove_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories-&gt;plugin_public, 'woocommerce_optional_accessories_display' ), 30 );\nadd_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories-&gt;plugin_public, 'woocommerce_optional_accessories_display' ), 5 );<\/pre>\n<p>5 Is the new position for both elements.<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-418","faq","type-faq","status-publish","hentry","faq_topics-product-accessories-filter-hooks"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":2,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/418\/revisions"}],"predecessor-version":[{"id":5514,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/418\/revisions\/5514"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}