答案 0 :(得分:0)
有两种方法可以将按钮添加到您的我的帐户页面(在任何WooCommerce的页面中进行更改):
add_action('woocommerce_order_details_after_order_table', 'jamy_add_button');
function jamy_add_button($order) {
/* Your code */
echo "Your button html code";
}
Copy your `/wp-content/plugins/woocommerce/templates/order/order-details.php` file to `/wp-content/theme/your_theme/woocommerce/order/order-details.php`.
Then edit or add the button to the copied file as your needs.