When you create a new field with option values such as:
array(
'name' => 'Test Multi Checkbox',
'desc' => 'field description (optional)',
'id' => 'wiki_test_multicheckbox',
'type' => 'multicheck',
'options' => array(
'check1' => 'Check One',
'check2' => 'Check Two',
'check3' => 'Check Three',
array(
'check1' => 'Check One',
'check2' => 'Check Two',
'check3' => 'Check Three',
)
),
),
You should see a multi-check option that's hierarchical as such:

as such:
You get the following PHP error:
( ! ) Notice: Array to string conversion in /app/public/wp-content/plugins/give/includes/libraries/cmb2/includes/types/CMB2_Type_Multi_Base.php on line 42
Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):
WP_Debugadd_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );
function yourprefix_register_demo_metabox() {
$cmb = new_cmb2_box( array(
// Box Config...
) );
$cmb->add_field( array(
array(
'name' => 'Test Multi Checkbox',
'desc' => 'field description (optional)',
'id' => 'wiki_test_multicheckbox',
'type' => 'multicheck',
'options' => array(
'check1' => 'Check One',
'check2' => 'Check Two',
'check3' => 'Check Three',
array(
'check1' => 'Check One',
'check2' => 'Check Two',
'check3' => 'Check Three',
)
),
),
) );
}
I trust you enough to assume right away that this is, for sure, a legit bug that could use addressing.
Thanks for the trust 馃憤
If I get the time I'll submit a PR with the fix to address it 馃帀
I there an update here or any new features to use instead?
Haven't seen anything for new movement for this issue specifically. New features available to everyone can be read about in the changelogs found at https://github.com/CMB2/CMB2/releases