Kenin
(@kbassart)
Automattic Happiness Engineer
Hi there,
If you’re using a plugin to add this feature to WooCommerce and it’s not working as it should; you’ll need to follow up with the developer of said plugin, as this wouldn’t be a WooCommerce issue.
Please follow up on the appropriate thread as we’ll be closing this as of now.
It is a WooCommerce issue if that section doesn’t implement priority like the other WooCommerce sections do. It looks like you can position things near “order notes” doing things like:
} elseif( $position == "before_notes" ) {
$this->loader->add_action( 'woocommerce_before_order_notes', $plugin_public, 'coderockz_woo_delivery_add_custom_field' );
} elseif( $position == "after_notes" ) {
$this->loader->add_action( 'woocommerce_after_order_notes', $plugin_public, 'coderockz_woo_delivery_add_custom_field' );
}
However, the “order” group should also use a priority system to make it easier to order additional fields like in other groups like “billing”.
It’s definitely a WooCommerce issue for not being consistent with its other sections. It has nothing to do with the plugin. If priority is not respected in the “order” group, is there another way to sort custom fields in this area without having to hook into the woocoomerce_after_order_notes or woocoomerce_before_order_notes hooks?
-
This reply was modified 3 years, 8 months ago by own3mall.
Ok, well it looks like you can get custom checkout fields in the “order” group to sort if you sort the fields manually in code using a custom sort function.
It would be nice if these sections would sort themselves automatically based on a priority attribute like they do in the billing and shipping sections.