title: WooCommerce admin product custom checkbox field not saving value
body: <p>i created custom checkbox on product options, but stuck in saving data.
  I tried all possible variants, but without success.
  Where i am going wrong?
  thanks</p>
  <p>This is code:</p>
  <pre><code>add_action( 'woocommerce_product_options_sku', 'custom_checkbox_field' );
  function custom_checkbox_field(){
      global $post, $product_object;
  
      if ( ! is_a( $product_object, 'WC_Product' ) ) {
              $product_object = wc_get_product( $post-&gt;ID );
      }
        
              
      woocommerce_wp_checkbox(
      array(
          'id'            =&gt; 'custom_checkbox_field',
          'value'         =&gt; empty($values) ? 'yes' : $values,
          'label'         =&gt; __( 'Label', 'woocommerce' ),
          'description'   =&gt; __( 'Description', 'woocommerce' ),
          )
      );
      
  }
  
  add_action( 'woocommerce_process_product_meta', 'save_custom_field' );  
      function save_custom_field( $post_id ) {
      
  
       // grab the product
       $product = wc_get_product( $post_id );
  
        // save data
        $product-&gt;update_meta_data( 'custom_checkbox_field', isset($_POST['custom_checkbox_field']) ? 'yes' : 'no' ); 
        $product-&gt;save();
      }
  </code></pre>