Let’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:

Mandatory accessories:

remove_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories->plugin_public, 'woocommerce_mandatory_accessories_display' ), 25 );
add_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories->plugin_public, 'woocommerce_mandatory_accessories_display' ), 5 );

Optional Accessories:

remove_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories->plugin_public, 'woocommerce_optional_accessories_display' ), 30 );
add_action( 'woocommerce_after_single_product_summary', array( $WooCommerce_Product_Accessories->plugin_public, 'woocommerce_optional_accessories_display' ), 5 );

5 Is the new position for both elements.

Deja una respuesta

Tu dirección de correo electrónico no será publicada.