How to make phone field not required in WooCommerce checkout?

To make phone field not required in WooCommerce, you need to paste this snippet of code into the “functions.php” file of your WordPress theme.

To edit “functions.php” navigate to your WP admin > Appearance > Editor > select “Theme Functions (functions.php)” on the right.

Copy this snippet below and paste it into the editor to the beginning or to the very end of the code: