I am trying to add an extra field on the backend menu of

Edit Subscription menu (SUMO Subscription (plugin) -> List of Subscription -> Edit Subscription)

I am sending you a screenshot for where exactly I would like to add it. enter image description here

do_action( 'sumosubscriptions_admin_after_general_details' , $post->ID );

// 10 is the priority, higher means executed first
// 1 is number of arguments the function can accept
add_action('sumosubscriptions_admin_after_general_details', 'custom_domain', 10, 1);
function custom_domain($post) {
    // do something
    <input type="text" name="Domain" value="<?php echo $name;?>">

I know it's possibly an easy one problem but I haven't succeed to find a solution. Thanks in advance for your help!


I'm not familiar with the subscription plugin you're using. But as you're attaching a custom function to a action hook, you should most likely echo or print the html you want to be displayed at that particular point. Like this,

function custom_domain( $post_id ) {
  // if this is saved as post_meta then get it with get_post_meta( $post_id, 'some_meta_key', true );
  $domain = 'someurl.com'; 
    '<input type="text" name="Domain" value="%s">',
    esc_url( $domain )
  • 1
    Thank you very much for the feedback. It worked just like i wanted! – Zabzuki Aug 30 '19 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.