Hey guys,
Im trying to add rows from data that the user will send from http request, and insert it into a certain repeater field.
Right now, I’m having troubles with the function that look like that:
function add_row_to_direction() {
$row =
array(
'title' => "Test Title",
'directions_group' => array(
array(
'direction' => "Test Direction"
)
)
);
add_row( "directions", $row, 365 );
}
The problem is when i add this test function to the rest api endpoint callback function it does not happens, and if i just call the function inside functions.php all works as expected.
I hope you guys can help me,
Thanks a lot,
Ben
Does anyone has an idea that can help?