custom post types - Add form after woocommerce admin order edit

I need to add a form after closing form tag in woocommerce admin order edit page. I need to do this because the action o

I need to add a form after closing form tag in woocommerce admin order edit page. I need to do this because the action of this form points to an iframe...

ex:

<form action='someurl' target='myiframe'>
   <input type='hidden' value='myvalue' /> 
</form>
<iframe id='myiframe' src='someurl'></iframe>

I need to put anywhere in order details admin page... I researching by two days.. the only way i found is in the admin_footer, but the layout breaks.

with admin_footer hook the there are two or three div.clear between the default form and my form...

I'm asking this here because i think it is just a custom post type... if doesn't i'm sorry for that.

I'm thinking in place this form in order list admin page!!! anyone can help me?

thanks for helping!

I need to add a form after closing form tag in woocommerce admin order edit page. I need to do this because the action of this form points to an iframe...

ex:

<form action='someurl' target='myiframe'>
   <input type='hidden' value='myvalue' /> 
</form>
<iframe id='myiframe' src='someurl'></iframe>

I need to put anywhere in order details admin page... I researching by two days.. the only way i found is in the admin_footer, but the layout breaks.

with admin_footer hook the there are two or three div.clear between the default form and my form...

I'm asking this here because i think it is just a custom post type... if doesn't i'm sorry for that.

I'm thinking in place this form in order list admin page!!! anyone can help me?

thanks for helping!

Share Improve this question asked Feb 19, 2020 at 12:55 Reculos Gerbi NetoReculos Gerbi Neto 1033 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You can use the other action which called before wp_footer. You can use action "in_admin_footer"

// define the in_admin_footer callback 
function action_in_admin_footer() { 
    global $pagenow, $current_page, $post;

    //$current_page->post_type === 'shop_order' 

    if( $pagenow == 'post.php' && !empty( $_GET['action'] ) && $_GET['action'] == 'edit' && $post->post_type == 'shop_order' ) {
        // make action magic happen here... 
    }
}; 

// add the action 
add_action( 'in_admin_footer', 'action_in_admin_footer' ); 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744733863a4590624.html

相关推荐

  • custom post types - Add form after woocommerce admin order edit

    I need to add a form after closing form tag in woocommerce admin order edit page. I need to do this because the action o

    15小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信