Support » Plugin: WooCommerce PayPal Powered by Braintree Payment Gateway » Add content after My Payment Methods table

  • Resolved David Wang

    (@blogjunkie)


    Hi there, I want to add some text to after the My Payment Methods table (found at example.com/my-account/payment-methods/)

    I see in the plugin there is a action hook, but I don’t know how to hook into it. The action hook is found on line 203 of class-sv-wc-payment-gateway-my-payment-methods.php:

    do_action( 'wc_' . $this->get_plugin()->get_id() . '_after_my_payment_method_table', $this );

    How do I hook onto this with add_action( 'hook_name', 'my_function' );? What is hook_name?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 👋 hey @blogjunkie, the plugin ID is defined in the main plugin file: braintree

    So the hook name should be: wc_braintree_after_my_payment_method_table

    cheers!

    Thanks Beka, appreciate your quick response. I realized that there was also the more general woocommerce_after_account_payment_methods hook which turned out to be better for my purposes. Just sharing that for anyone else who may need.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add content after My Payment Methods table’ is closed to new replies.