admin管理员组文章数量:1391999
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 badges1 Answer
Reset to default 1You 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' );
本文标签: custom post typesAdd form after woocommerce admin order edit
版权声明:本文标题:custom post types - Add form after woocommerce admin order edit 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744733863a2622206.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论