• Resolved Patriot06

    (@patriot06)


    I have been having a very hard time and could really use some help. I am new to code, but trying to learn. I have a field “sell_products” and if “Yes” selected add “vendor” and membership user role example “pmpro_role_1”. If “no” selected then only add “pmpro_role_1”. I have been trying to use “do_action( ‘pmpro_after_checkout’, int $user_id, $morder );”. I would great appreciate any help.

    • This topic was modified 4 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator James Huff

    (@macmanx)

    I recommend asking at https://buddypress.org/support/ so the BuddyPress developers and support community can help you with this.

    Moderator bcworkz

    (@bcworkz)

    If you are seeking generic coding advice regarding the use of action hooks in general, check out the Plugin Handbook. The action you quoted is passing 2 arguments, so in particular examine the examples under “Number of Arguments”. Custom code like that works just as well in custom or child themes as it does in plugins.

    For advice on how to use that particular hook, examining the source code where the do_action() call occurs can be informative. If that doesn’t tell you enough, I too recommend what James had suggested ^^^^.

    Thread Starter Patriot06

    (@patriot06)

    Thank you both for your answers. I appreciate the guidance. Thank You.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Roles after checkout’ is closed to new replies.