Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author CodeBard

    (@codebard)

    Plugin uses ordinary wordpress actions and filters to add that field. Showing the field happens with the below hook operations:

    add_action( ‘show_user_profile’, array(&$this, ‘add_custom_user_field’) );
    add_action( ‘edit_user_profile’, array(&$this, ‘add_custom_user_field’) );

    Then, try removing them first in your theme functions.php :

    remove_action( ‘show_user_profile’, array( &$cb_p6, ‘add_custom_user_field’ ) );
    remove_action( ‘edit_user_profile’, array( &$cb_p6, ‘add_custom_user_field’ ) );

    And adding them with priority:

    add_action( ‘show_user_profile’, array(&$cb_p6, ‘add_custom_user_field’),5);
    add_action( ‘edit_user_profile’, array(&$cb_p6, ‘add_custom_user_field’,5) );

    Modify the number 5 according to where you want the field to appear.

    These 4 lines should be placed one after another like this.

    Thread Starter HaloPinay

    (@halopinay)

    Hi.. ?? Thanks for the quick response. I’m not an expert at this.

    I pasted the above into my functions (the 4 lines) and nothing happened. I pasted just the first 2 in order to remove. Nothing happened.

    I also tried:

    remove_action( ‘show_user_profile’, array( &$cb_p6, ‘patreon_user”‘ ) );
    remove_action( ‘edit_user_profile’, array( &$cb_p6, ‘patreon_user”‘ ) );

    Nothing happened

    I also tried
    remove_action( ‘show_user_profile’, ‘cb_p6_patreon_user’ );
    remove_action( ‘edit_user_profile’, ‘cb_p6_patreon_user’ );

    Nothing happened

    I also tried wrapping it in a function for admin_init, nothing.

    I also noticed the field label is rendering as address and field name and id are rendering as cb_p6_patreon_user.

    Could it be the plugin adds the field AFTER my theme functions.php executes?

    Could it be not working because I’m using a child theme?

    In my installation, the field is currently quite buried in between my SEO author settings and my WooCommerce billing address area.

    If you have any ideas, that would be an awesome help.

    Plugin Author CodeBard

    (@codebard)

    Could it be the plugin adds the field AFTER my theme functions.php executes?

    Could it be not working because I’m using a child theme?

    It’s possible that if the field is being rendered in admin side (user profile editing field in user profile) then theme functions.php may not be getting affected, OR, the plugin is loading after the theme functions.php comes.

    A good bet could be to add through your own dummy plugin and having the plugin initialize very late.

    Thread Starter HaloPinay

    (@halopinay)

    Good idea!!!

    Plugin Author CodeBard

    (@codebard)

    Did it work then?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Move Patreon Profile Field?’ is closed to new replies.