From 5994b89777e61a3ddc86817a1fa0b465ee9e1067 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Tue, 19 May 2020 16:53:18 +0530 Subject: [PATCH 01/18] Add logic for WC Vendors functionality, PFWMA-125 --- ...rce-multi-account-management-list-data.php | 11 +- ...mmerce-multi-account-management-vendor.php | 145 ++++++++++++++++++ ...r-woocommerce-multi-account-management.php | 10 +- 3 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 includes/class-paypal-for-woocommerce-multi-account-management-vendor.php diff --git a/includes/class-paypal-for-woocommerce-multi-account-management-list-data.php b/includes/class-paypal-for-woocommerce-multi-account-management-list-data.php index 888a792..28268dc 100644 --- a/includes/class-paypal-for-woocommerce-multi-account-management-list-data.php +++ b/includes/class-paypal-for-woocommerce-multi-account-management-list-data.php @@ -36,7 +36,14 @@ function column_default($item, $column_name) { $user_info = ''; if ($condition_user) { if ($condition_user != 'all') { - $user_info = '

' . sprintf('When User ID is %s', $condition_user) . '

'; + $user = get_user_by( 'id', $condition_user ); + $user_string = sprintf( + esc_html__( '%1$s (#%2$s %3$s)', 'woocommerce' ), + $user->display_name, + absint( $user->ID ), + $user->user_email + ); + $user_info = '

' . sprintf('When Author is %s', $user_string) . '

'; } } $other_condition = ''; @@ -76,7 +83,7 @@ function column_default($item, $column_name) { add_thickbox(); $product_text = ''; - if (!empty($product_ids)) { + if (!empty($product_ids) && is_array($product_ids)) { $products = $product_ids; $product_text .= 'Products'; $product_text .= '