Add custom options on woocommerce product page and display selected values on cart page

I have added some custom options on woocommerce single product page using the code below on my theme’s functions.php:

     function options_on_single_product(){
     ?>
      <input type="radio" name="option1" checked="checked" value="option1"> option 1 <br />
      <input type="radio" name="option1" value="option2"> option 2
       <?php
      }
       add_action("woocommerce_before_add_to_cart_button", "options_on_single_product");

Now i want to display the selected option value on cart page. Please help me to do this.
Thanks

Read more here: Add custom options on woocommerce product page and display selected values on cart page

Leave a Reply

Your email address will not be published. Required fields are marked *