Hi Long,
Ok so I am running this code inside a class within my own plugin (oop structure). I have just realised this is being called too early? If i wrap this code inside wp_loaded it works. I guess I cant use the helper function then as I need this to run before the page loads. Is there any other option? other than direct wpbd calls?
add_action( 'wp_loaded','test' );
function test() {
$value = rwmb_meta( 'city', ['storage_type' => 'custom_table', 'table' => 'wp_dc_users', 'object_type' => 'user'], 3 );
var_dump($value);
}
I have also tested this inside my theme files and it does load the value correctly.