I posted another thread on the issue, but I tried a different method while waiting for a response and I am at a complete loss.
In the 'rwmb_frontend_before_process' hook, I do this:
foreach($_POST['provider_units'] as &$unit):
$unit['available'] = $dt->format('Y-m-d');
endforeach;
and throughout all the hooks, I pass this:
ca_log3(print_r($_POST['provider_units'], 1));
No matter where I call it, including 'rwmb_frontend_after_save_post', it shows this:
Array
(
[0] => Array
(
[available] => 2022-12-15
)
[1] => Array
(
[available] => 2022-12-15
)
)
So the available date is correctly being carried from when I changed it in pre-process all the way through the save process. Yet checking the postmeta table, it still shows as this (after unserializing)
Array
(
[0] => Array
(
[available] => 2022-09-01
)
[1] => Array
(
[available] => 2022-10-05
)
)
So why in the world would it not be updating the postmeta table in that hook? The _POST variable clearly shows 'available' being properly set to today, but it never updates the DB? I'm so confused.
Also, it IS being saved. I am using custom tables and actually pulling the data from those tables on my actual site and it shows the available date as 'today'. So the $_POST variable is saving in the custom table as it should, but it is NOT updating postmeta.
This is so frustrating. The postmeta table makes me want to ditch wordpress entirely!