Missing argument 2 for the function in wordpress
The format is:
add_action( HOOK, CALLBACK, PRIORITY, NUMBER OF PARAMETERS );
You set the priority to 2
and it should be the parameters ($post,$parent
). Correction:
add_action( 'init', 'get_appcara_child', 10, 2 );
PS: 10
is the default priority.