重力表单,如何将表单链接到会员专业注册

时间:2013-05-22 作者:Danny

尝试将自定义重力表单链接到我的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/

没有运气。想知道这里是否有人试图将这两个系统连接起来。在线找到线程,但没有那么大帮助。

1 个回复
最合适的回答,由SO网友:Jared Cobb 整理而成

我相信这个代码(按原样)永远不会调用您的post_to_third_party 作用这个add_action hook需要引用该函数,如下所示:

add_action("gform_after_submission_5", "post_to_third_party", 10, 2);
希望有帮助,玩得开心!

结束

相关推荐

Membership Plugin

我正在为高级博客内容寻找一个好的插件。我的客户希望提供30次免费试用以及每月/6个月/每年付费的计划。它应该为每个人显示一个除此之外的帖子,即使他们作为客人在网站上,没有任何会员资格、试用或特价。它还需要通过贝宝接收付款,并在付款后自动打开订阅。我想能够自定义注册页面,以添加地址和电话号码等其他字段。