conflicts with registration helper
-
I can’t seem to get this to work with my site. After i put my code together when I’m saving my buddypress profile on the frontend I get this error:
Warning: Cannot modify header information – headers already sent by (output started at /home3/dduser/dev.friendometry.com/wp-content/plugins/pmpro-buddypress/includes/profiles.php:56) in /home3/dduser/dev.friendometry.com/wp-includes/pluggable.php on line 1219
here is the code i added to my functions.php
/** * Based on the Register Helper example. * We've added a "buddypress" option for each field set to the XProfile name we used when setting up * the fields in the BuddyPress extended profile. * If the PMPro BuddyPress Add On is activated then the fields will be synchronized. * Register Helper: https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/ * PMPro BuddyPress: https://www.paidmembershipspro.com/add-ons/buddypress-integration/ */ function 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( 'rt_childname', // input name, will also be used as meta key 'text', // type of field array( 'buddypress' => 'A Catchy User Name', // XProfile Field Name 'label' => 'A Catchy User Name for your child', // custom field label 'profile' => true, // show in user profile 'required' => true, // make this field required ) ); // 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' );
can you tell what I did wrong?
- The topic ‘conflicts with registration helper’ is closed to new replies.