Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin
It’s a very broad question, but my approach would look something like this: I’d replace your code with this: <?php my_the_payment_options(); ?> And then in my plugin: function my_the_payment_options() { $payment_options = get_my_available_payment_options(); if ( $payment_options ) : ?> <div class=”payments-options”> <?php foreach ( $payment_options as $k => $v ) call_user_func( $v[‘callback’] ); ?> </div> … Read more