Hi – we want to add some data to an woocommerce-subscription after it is purchased.
i can create the input form on subscription detail page by hooking into
add_action( 'woocommerce_subscription_totals_table', 'acf_inputform', 30, 1 );
there i getting the $subscription which i need to store it to the correct id
function acf_inputform($subscription) {
$sid = ($subscription->id);
//some voodoo
acf_form_head();
acf_form(array(
'post_id' => $sid,
'post_title' => false,
'post_content' => false,
'submit_value' => __('Update meta')
));
Bu i also need this subsciption-id on rendering the fields (for the form) because there are some calculations to show it readonly or not.
How can i pass these ID to the “load field filter”?
Is my approach correct?
add_filter('acf/load_field/name=joker_1', 'my_acf_load_field');