• Resolved own3mall

    (@own3mall)


    Hi All,

    I’m using a plugin that creates custom checkout fields. You can create and assign custom checkout fields to various WooCommerce groups. One of the groups you can add custom checkout fields to is the “order” group. However, the priority property doesn’t appear to be respected in this section. So how would I set the order of these new fields in this group, and why doesn’t this section respect and use the priority property the others do? Each section should have priority (order) support.

    https://rudrastyh.com/woocommerce/reorder-checkout-fields.html

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Thread Starter own3mall

    (@own3mall)

    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.
    Thread Starter own3mall

    (@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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Reorder Checkout Fields in Order Group (Order Comments Section)’ is closed to new replies.