adding another checkout box
-
Hello,
Im trying to add another checkout box to our custom fields..COde is..
<?php
/*
Plugin Name: Register Member custom fields PMPRO
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Register Helper Initialization Example
Version: .1
Author: Stranger Studios
Author URI: https://www.strangerstudios.com
*/
//we have to put everything in a function called on init, so we are sure Register Helper is loadedfunction my_pmprorh_init()
{
//don’t break if Register Helper is not loaded
if(!function_exists(“pmprorh_add_registration_field”))
{
return false;
}//define the fields
$fields = array();
$fields[] = new PMProRH_Field(
“collegeRegNo”, // input name, will also be used as meta key
“text”, // type of field
array(
“label”=>”College Registration No.”, // custom field label
“profile”=>”true”, // show in user profile
“memberslistcsv”=>true
));$fields[] = new PMProRH_Field(
“degreeObtain”, // input name, will also be used as meta key
“text”, // type of field
array(
“label”=>”Degree(s) Obtained”, // custom field label
“profile”=>”true”, // show in user profile
“memberslistcsv”=>true
));/* $fields[] = new PMProRH_Field(
“gender”, // input name, will also be used as meta key
“select”, // type of field
array(
“options”=>array( // <option> elements for select field
“” => “”, // blank option – cannot be selected if this field is required
“male”=>”Male”, // <option value=”male”>Male</option>
“female”=>”Female”, // <option value=”female”>Female</option>
“memberslistcsv”=>true
)));
*///add the fields into a new checkout_boxes are of the checkout page
foreach($fields as $field)
pmprorh_add_registration_field(
“checkout_boxes”, // location on checkout page
$field // PMProRH_Field object
);//that’s it. see the PMPro Register Helper readme for more information and examples.
}
add_action(“init”, “my_pmprorh_init”);I like to know how I can add another check out box.. I would like to add the fields for the payment processors but payment wont go through just collect information…
How can I do that?
Please advice..
Thank you
- The topic ‘adding another checkout box’ is closed to new replies.