I want to add a function with filter but i dont know what to pass add_filter what i read it needs 4 arguments is there anything fixed to pass this function please help
我想用Filter添加一个函数,但我不知道要传递什么Add_Filter我读取了什么它需要4个参数有什么修复方法可以传递这个函数吗请帮助
Please help i am super confused with all 4 parameters to pass in document examples i go the following code
请帮帮我,我对所有4个参数都很困惑,要在文档中传递示例,我要执行以下代码
function wpgetapi_save_customer_id( $result, $data, $values_sent, $endpoint ) {
if( isset( $result['customer_id'] ) ) {
$user_id = $data['data']['ID'];
add_user_meta( $user_id, 'crm_customer_id', $result['customer_id'] );
}
}
add_filter( 'wpgetapi_after_user_register', 'wpgetapi_save_customer_id', 10, 4 );
i really dont know why are they passing 10 here as the values are not 10 here they are all
is this fixed number or what
我真的不知道为什么他们在这里超过10,因为这里的值不是10,这里他们都是这个固定的数字还是什么
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!