Strange jump on checkout page

Hi!

We have a strange ‘jump’ when entering the checkout page. It jumps to the middle of the screen.

What is going wrong here?

Thanks in advance:slight_smile:

Hi there,

Please add this code in the child theme’s function.php to disable the autofocus on the checkout field:

/**
 * Disable autofocus at checkout.
 */
function iconic_disable_autofocus_firstname( $fields ) {
	$fields['billing']['billing_first_name']['autofocus'] = false;

	return $fields;
}

add_filter( 'woocommerce_checkout_fields', 'iconic_disable_autofocus_firstname' );

Hope this helps.

Hi Jade,

I have added the code, but nothing changes…

Thanks!

Hi There,

Please change the code to this:


/**
 * Disable autofocus at checkout.
 */
function iconic_disable_autofocus_firstname( $fields ) {
	$fields['billing']['billing_email']['autofocus'] = false;

	return $fields;
}

add_filter( 'woocommerce_checkout_fields', 'iconic_disable_autofocus_firstname' );

Let us know how it goes!

Hi Thai,

Still no luck…

Thanks

Hey There,

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Sure i will add a secure note

Hi there,

The autofocus is within the shipping fields which are hidden by default. You should add the shipping fields on that code too. Example,

$fields['shipping']['shipping_first_name']['autofocus'] = false;

Hope this helps :slight_smile:

Hi Rad,

Solved! Strange that this code is needed in the first place (we do not experience this in other woocommerce shops with Pro…)

Thanks!

You’re welcome!