The ACF Documentation recommends checking the values individually rather than simultaneously using an array.
The following code is from the ACF Documentation for the Checkbox field type:
http://www.advancedcustomfields.com/resources/field-types/checkbox/
/*
* Query posts for a checkbox value.
* This method uses the meta_query LIKE to match the string "red" to the database value a:2:{i:0;s:3:"red";i:1;s:4:"blue";} (serialized array)
* The above value suggests that the user selected "red" and "blue" from the checkbox choices
*/
$posts = get_posts(array(
'meta_query' => array(
array(
'key' => 'field_name', // name of custom field
'value' => '"red"', // matches exaclty "red", not just red. This prevents a match for "acquired"
'compare' => 'LIKE'
)
)
));
Therefore the query in pre_get_posts
should look like this:
$filter = array(
array(
'key' => 'delivery_method'
'value' => '"Online"'
'compare' => 'LIKE'
),
array(
'key' => 'delivery_method'
'value' => '"Scheduled"'
'compare' => 'LIKE'
)
)
$query->set('meta_query',$filter);