【发布时间】:2020-09-16 06:45:19
【问题描述】:
我们通过 $order-get_order_url() 显示用户元数据和订单详细信息以及链接到用户订单。但我找不到这样的发票。是否可以通过订单号或 ID 获取发票链接。 meta data
感谢和问候
【问题讨论】:
-
您好,您有解决办法吗?
-
我们试过这个,它成功了
<?php $actions = wc_get_account_orders_actions( $order ); if ( ! empty( $actions ) ) { foreach ( $actions as $key => $action ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited echo '<a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>'; } } ?> -
感谢您的帮助!
标签: wordpress woocommerce hook-woocommerce invoice