尝试将自定义重力表单链接到我的aMember Pro注册表单时遇到了困难。
我的函数文件中有以下内容:
// Gravity Forms to aMember Pro Link Up
add_action("gform_after_submission_5", "after_submission", 10, 2); // Run these scripts strictly on Form ID 5
function post_to_third_party($entry, $form) {
$post_url = \'https://www.domain.com/amember/signup/index/c/cart/\';
$body = array(
\'name_f\' => $entry[\'3\'],
\'name_l\' => $entry[\'4\'],
\'email\' => $entry[\'1\'],
\'login\' => $entry[\'2\'],
\'pass\' => $entry[\'5\']
);
$request = new WP_Http();
$response = $request->post($post_url, array(\'body\' => $body));
}
我已尝试将post\\u url设置为1。
https://www.domain.com/amember/signup/index/c/cart/ 2.
https://www.domain.com/amember/signup/index/c/ 和3。
https://www.domain.com/amember/signup/没有运气。想知道这里是否有人试图将这两个系统连接起来。在线找到线程,但没有那么大帮助。
最合适的回答,由SO网友:Jared Cobb 整理而成
我相信这个代码(按原样)永远不会调用您的post_to_third_party
作用这个add_action
hook需要引用该函数,如下所示:
add_action("gform_after_submission_5", "post_to_third_party", 10, 2);
希望有帮助,玩得开心!