使用此自定义挂钩函数示例可以轻松完成此操作:
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'admin_custom_row_after_order_addresses', 10, 1 );
function admin_custom_row_after_order_addresses( $order ){
?>
</div></div>
<div class="clear"></div>
<!-- new custom section row -->
<div class="order_data_column_container">
<div class="order_data_column_wide">
<h3><?php _e("My Custom row title"); ?></h3>
<!-- custom row paragraph -->
<p><?php
_e("Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.");
?></p>
<?php
}
代码进入功能。活动子主题(或活动主题)的php文件。
已测试并正常工作。