最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

forms - Pay before posting (frontend insert post)

programmeradmin0浏览0评论

I have a form on the frontend which I want users to fill out, when they have I want to save the data and redirect them to pay before submitting the post. How do I save the data before they pay?

I have a cookie working that lets me know when they have successfully paid. If they haven't paid then the form action looks like this:

$form_action = get_bloginfo('template_url').'/Checkout/paypal_ec_redirect.php';

Can I pass these post variables to the above page somehow?

$new_post = array(
    'post_title'    => $_POST['title'],
    'post_content'  => $_POST['description'],
    'post_status'   => 'draft',           
    'post_type' => 'listing'                 
);

I have a form on the frontend which I want users to fill out, when they have I want to save the data and redirect them to pay before submitting the post. How do I save the data before they pay?

I have a cookie working that lets me know when they have successfully paid. If they haven't paid then the form action looks like this:

$form_action = get_bloginfo('template_url').'/Checkout/paypal_ec_redirect.php';

Can I pass these post variables to the above page somehow?

$new_post = array(
    'post_title'    => $_POST['title'],
    'post_content'  => $_POST['description'],
    'post_status'   => 'draft',           
    'post_type' => 'listing'                 
);
Share Improve this question edited Apr 8, 2015 at 11:32 Pieter Goosen 55.4k23 gold badges115 silver badges210 bronze badges asked Apr 8, 2015 at 11:20 user43251user43251 1301 silver badge8 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You can use sessions to store the data. There is a plugin also for that which I have used in the past and it works quite good.

https://wordpress/plugins/wp-session-manager/

发布评论

评论列表(0)

  1. 暂无评论