Support

Account

Home Forums Backend Issues (wp-admin) Move ACF fields below WooCommerce custom fields Reply To: Move ACF fields below WooCommerce custom fields

  • Solved, dunno if there’s an easier way?

    function move_acf_meta_box() {
        global $wp_meta_boxes;
    
        $post_type = 'product';
        
        // Get ACF meta box.
        $acf_meta_box = $wp_meta_boxes[$post_type]['normal']['high']['acf-group_69266351484e9'];
        unset( $wp_meta_boxes[$post_type]['normal']['high']['acf-group_69266351484e9'] );
        
        // Move it to 'normal' location with 'low' priority.
        if ( empty( $wp_meta_boxes[$post_type]['normal']['low'] ) ) {
            $wp_meta_boxes[$post_type]['normal']['low'] = [];
        }
        $wp_meta_boxes[$post_type]['normal']['low']['acf-group_69266351484e9'] = $acf_meta_box;
        
    }
    add_action( 'add_meta_boxes', 'move_acf_meta_box', 99 );