【发布时间】:2018-09-30 16:21:12
【问题描述】:
如果 if 语句为真,我想在我的 functions.php 中删除 WooCommerce 中的订单详细信息表。我搜索了很多,但不知道该怎么做。
这是WooCommerce wc-template-functions.php中包含文件的方式:
if ( ! function_exists( 'woocommerce_order_details_table' ) ) {
/**
* Displays order details in a table.
*
* @param mixed $order_id Order ID.
*/
function woocommerce_order_details_table( $order_id ) {
if ( ! $order_id ) {
return;
}
wc_get_template( 'order/order-details.php', array(
'order_id' => $order_id,
) );
}
}
所以我需要这样的东西:
if ( value != true ) {
hide_order_details();
}
【问题讨论】:
标签: php wordpress templates woocommerce orders