【发布时间】:2019-07-01 08:08:04
【问题描述】:
【问题讨论】:
标签: woocommerce hook-woocommerce
【问题讨论】:
标签: woocommerce hook-woocommerce
有两种方法可以将按钮添加到您的我的帐户页面(在任何 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.
【讨论】: