Home › Forums › WoodMart support forum › Test Server Support › Reply To: Test Server Support
Olivia
The default checkout page, has the payment method appears after the order review, as the first screenshot but I want to have payment method on the top left as in the second sreenshot. I added those two lines of code to function.php ( under the child theme) , is that the best practice to your theme or other options is better
remove_action( ‘woocommerce_checkout_order_review’, ‘woocommerce_checkout_payment’, 20 );
add_action( ‘woocommerce_checkout_before_customer_details’, ‘woocommerce_checkout_payment’, 2 );
Also I want remove billing form so I added this line, and also have to add this functions, othewise got javascript errors for all the fields in the billing form let me know if there is better solutions with your theme
remove_action( ‘woocommerce_before_checkout_form’, ‘woocommerce_checkout_coupon_form’, 10 );
add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );
function custom_override_checkout_fields( $fields ) {
unset($fields[‘billing’][‘billing_first_name’]);
unset($fields[‘billing’][‘billing_last_name’]);
unset($fields[‘billing’][‘billing_company’]);
unset($fields[‘billing’][‘billing_address_1’]);
unset($fields[‘billing’][‘billing_address_2’]);
unset($fields[‘billing’][‘billing_city’]);
unset($fields[‘billing’][‘billing_postcode’]);
unset($fields[‘billing’][‘billing_country’]);
unset($fields[‘billing’][‘billing_state’]);
unset($fields[‘billing’][‘billing_phone’]);
unset($fields[‘order’][‘order_comments’]);
unset($fields[‘billing’][‘billing_email’]);
unset($fields[‘account’][‘account_username’]);
unset($fields[‘account’][‘account_password’]);
unset($fields[‘account’][‘account_password-2’]);
return $fields;
}
attach screenshot to the function.php under the child theme