我在哪里可以找到这个问题的答案,如何关闭对供应商的订单通知,让管理员只收到每个订单的通知 谢谢
问问题
94 次
1 回答
0
/**
* Filter orders of current user
*
* @param object $args
* @param object $query
* @since 2.9.4
* @return object $args
*/
function dokan_filter_orders_for_current_vendor( $args, $query ) {
global $wpdb;
if ( current_user_can( ‘manage_woocommerce’ ) ) {
if ( ! empty( $_GET[‘vendor_id’] ) ) {
$getdata = wp_unslash( $_GET );
$vendor_id = wc_clean( $getdata[‘vendor_id’] );
$args[‘join’] .= ” LEFT JOIN {$wpdb->prefix}dokan_orders as do ON $wpdb->posts.ID=do.order_id”;
$args[‘where’] .= ” AND do.seller_id=$vendor_id”;
}
于 2019-10-26T06:38:29.273 回答