Leave a Reply

3 comments

  1. I believe you need to add the id to $sale in you update_post_meta field. Like so:

    <?php
    if (isset($_POST['save'])) {
    
        $ids = $_POST['item_id'];
        $sales = $_POST['sale_price'];
    
    foreach ($ids as $id){
    
        update_post_meta($id,'_sale_price',$sale[$id]));
    
    }
    } ?>