Save a pod with a yes/no field

I have created a CPT which has a Yes/No field. I am building a custom page where users can change this Yes/No field in bulk. I am trying to pass values to this field but nothing sticks. I have tried values 0 and 1 as integers and strings, also the strings “Yes” and “No”.

I am saving the posts like this:

$pod = pods( 'pod_cpt', $post_id );

$data = array(
    'item_sold' => $boolean,
    'row' => $row,
);
$pod->save( $data );

The rowfield is being saved since it’s a text field, however the item_soldfield is not.

Any ideas?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer