I'm trying to set up custom table for saving custom user meta, but I cannot get it to work. It works fine if I select post
for custom fields group type, but not if I select user
.
Here's the code I'm using for table creation:
add_action( 'init', 'prefix_create_user_table' );
function prefix_create_user_table() {
if ( ! class_exists( 'MB_Custom_Table_API' ) ) {
return;
}
MB_Custom_Table_API::create( 'prefix_users_data', array(
'user_credits' => 'BIGINT(10)',
));
}
For custom fields group definitions I'm using Metabox AIO and builder, with all extensions enabled.
Where's the catch?