• david taylor

    (@dipikachandaliya)


    if(isset($_POST['customstock_submit_specific_product']))
    {
    	global $wpdb,$product;
    	$id = $product->id;
    $custommsg = sanitize_text_field( $_POST['customstock-msg'] );
    $customprocessingtime = sanitize_text_field( $_POST['customstock-Processing-time'] );
    $customstockquantity = sanitize_text_field( $_POST['customstock-quantity'] );
    $customstockcatlogpage = sanitize_text_field( $_POST['customstock-catlogpage'] );
    $customstockinstockdate = sanitize_text_field( $_POST['customstock-instockdate'] );				$customstockinstockdate = date("Y-m-d",strtotime($customstockinstockdate) );
    
    wpdb->insert('wp_woocommerce_specific_product_settings', array(
    	'custom_msg' => $custommsg,
    	'order_processing_time'  => $customprocessingtime,
    	'exp_instock_date' => $customstockinstockdate,
    	'show_stockstatus_quantity' => $customstockquantity,
    	'showon_catlog' => $customstockcatlogpage,
    	'specific_product_id' =>  $id
    	));
    }
  • The topic ‘How to save settings of product page’ is closed to new replies.