I found the solution by changing the remove fieldset function to this:
/* Remove all Give Fieldsets */
function give_remove_fieldsets() {
remove_action( 'give_donation_form_top', 'give_output_donation_amount_top' );
remove_action( 'give_payment_mode_select', 'give_payment_mode_select' );
remove_action( 'give_donation_form_after_user_info', 'give_user_info_fields' );
remove_action( 'give_cc_form', 'give_get_cc_form' );
remove_all_actions( 'give_donation_form_after_cc_form' );
}
add_action( 'init', 'give_remove_fieldsets' );
And I changed the add fieldset function too as the previous one had some bugs:
/* Add all Give Fieldsets */
function give_reorder_fieldsets() {
add_action( 'give_checkout_form_top', 'give_user_info_fields' );
add_action( 'give_checkout_form_top', 'give_output_donation_amount_top' );
add_action( 'give_checkout_form_top', 'give_payment_mode_select' );
add_action( 'give_donation_form_after_cc_form', 'give_checkout_submit' );
}
add_action( 'init', 'give_reorder_fieldsets' );
Now, it’s ordered properly:
1) Personal Info
2) Custom Donation Amount Input
3) Payment Details
4) Donate Now Button
Here is a screenshot of how it looks: https://imgur.com/a/sTBc3
Another question, would it be possible to add <legend> above the amount? Like personal details or select payment like title?
Thanks