• Hi there,

    I was wondering if you are willing to update this plugin with some more advanced options.

    Would it be possible to make it so that the Name, Surname, Email fields get populated by getting info from some other form via shortcodes. I have a form builder (Piotnet PAFE) when you create your form it generates a shortcode for each field. So your Name, Surname, Email etc. all have shortcodes. It even allows you to make a calculated field where a total is generated.

    It would be great if the rave payment form could pull the entries of the various fields via shortcodes. That way your customers could choose options on your forms and those options could create a total and that total could be transferred to the rave payment form dynamically. along with the name, surname, email address etc…

    Let me know if this would be possible.

    Thank you.

Viewing 1 replies (of 1 total)
  • you have to edit the plugin directly.

    Goto rave-payment-forms/includes/rave-shortcode.php

    around line 93 or there about

    change this code:

    $main_option_default = array(
    ‘amount’ => ”,
    ‘custom_currency’ => [],
    ’email’ => $email,
    ‘country’ => $admin_settings->get_option_value(‘country’),
    ‘currency’ => $admin_settings->get_option_value(‘currency’),
    ‘recurring_payment’ => $payment_plans_settings->get_option_value(‘recurring_payment’),
    ‘extra_count’ => count($extra_fields),
    ‘extra_checkbox_count’ => count($extra_fields_checkbox),
    ‘paymentplans’ => [
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_1’) => $plan_name_1,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_2’) => $plan_name_2,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_3’) => $plan_name_3,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_4’) => $plan_name_4,
    ],

    to this code:

    global $current_user;
    get_currentuserinfo();

    $email_n = $current_user->user_email;
    $current_user_id = get_current_user_id();
    $first_name = get_user_meta($current_user_id, ‘first_name’, true);
    $last_name = get_user_meta($current_user_id, ‘last_name’, true);

    $main_option_default = array(
    ‘amount’ => ”,
    ‘custom_currency’ => [],
    ’email’ => $email_n,
    ‘firstname’ => $first_name,
    ‘lastname’ => $last_name,
    ‘country’ => $admin_settings->get_option_value(‘country’),
    ‘currency’ => $admin_settings->get_option_value(‘currency’),
    ‘recurring_payment’ => $payment_plans_settings->get_option_value(‘recurring_payment’),
    ‘extra_count’ => count($extra_fields),
    ‘extra_checkbox_count’ => count($extra_fields_checkbox),
    ‘paymentplans’ => [
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_1’) => $plan_name_1,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_2’) => $plan_name_2,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_3’) => $plan_name_3,
    $payment_plans_settings->get_option_value(‘recurring_payment_plan_4’) => $plan_name_4,
    ],

    after this, you don’t need to use the email shortcode anymore. it works of the box. only user the email shortcode for single user if you want.

    Hope this Helps. Gracias.

    • This reply was modified 3 years, 11 months ago by biodun09.
Viewing 1 replies (of 1 total)
  • The topic ‘Customizing Rave pay form with Shortcodes’ is closed to new replies.