diff --git a/admin/class-paypal-for-woocommerce-multi-account-management-admin.php b/admin/class-paypal-for-woocommerce-multi-account-management-admin.php index a792d93..9966fbc 100644 --- a/admin/class-paypal-for-woocommerce-multi-account-management-admin.php +++ b/admin/class-paypal-for-woocommerce-multi-account-management-admin.php @@ -31,6 +31,7 @@ class Paypal_For_Woocommerce_Multi_Account_Management_Admin { private $version; public $final_associate_account; public $gateway_key; + public $message; /** * Initialize the class and set its properties. @@ -114,7 +115,6 @@ public function angelleye_display_multi_account_list() { $microprocessing_key_array = array('woocommerce_paypal_express_enable', 'woocommerce_paypal_express_testmode', 'woocommerce_paypal_express_account_name', 'woocommerce_paypal_express_sandbox_email', 'woocommerce_paypal_express_sandbox_merchant_id', 'woocommerce_paypal_express_sandbox_api_username', 'woocommerce_paypal_express_sandbox_api_password', 'woocommerce_paypal_express_sandbox_api_signature', 'woocommerce_paypal_express_email', 'woocommerce_paypal_express_merchant_id', 'woocommerce_paypal_express_api_username', 'woocommerce_paypal_express_api_password', 'woocommerce_paypal_express_api_signature', 'woocommerce_paypal_express_api_condition_field', 'woocommerce_paypal_express_api_condition_sign', 'woocommerce_paypal_express_api_condition_value', 'woocommerce_paypal_express_api_user_role', 'woocommerce_paypal_express_api_user', 'woocommerce_paypal_express_api_product_ids', 'product_categories', 'product_tags', 'buyer_countries', 'woocommerce_priority', 'angelleye_multi_account_choose_payment_gateway', 'store_countries', 'shipping_class', 'currency_code', 'ec_site_owner_commission', 'ec_site_owner_commission_label'); foreach ($microprocessing_key_array as $key => $value) { $microprocessing_new[$value] = isset($microprocessing[$value]) ? $microprocessing[$value] : array(); - } $microprocessing = $microprocessing_new; foreach ($microprocessing as $microprocessing_key => $microprocessing_value) { @@ -161,7 +161,7 @@ public function angelleye_display_multi_account_list() { case 'ec_site_owner_commission': echo sprintf('
', __('Site Owner Commission %', 'paypal-for-woocommerce-multi-account-management'), !empty($microprocessing_value[0]) ? $microprocessing_value[0] : ''); break; - case 'ec_site_owner_commission_label': + case 'ec_site_owner_commission_label': echo sprintf('
', __('Site Owner Commission Item Label', 'paypal-for-woocommerce-multi-account-management'), !empty($microprocessing_value[0]) ? $microprocessing_value[0] : ''); break; case 'woocommerce_paypal_express_api_user_role': @@ -349,24 +349,21 @@ public function angelleye_display_multi_account_list() { } } $option_five .= ''; - + $option_five_one = '

' . __('Select Author', 'paypal-for-woocommerce-multi-account-management') . '

'; $option_five_one .= ''; for ($x = 0; $x <= 100; $x++) { - if($x == 0) { - $woocommerce_priority_text = $x .' - Lowest'; - } elseif($x == 100) { - $woocommerce_priority_text = $x .' - Highest'; + if ($x == 0) { + $woocommerce_priority_text = $x . ' - Lowest'; + } elseif ($x == 100) { + $woocommerce_priority_text = $x . ' - Highest'; } else { $woocommerce_priority_text = $x; } @@ -395,7 +392,7 @@ public function angelleye_display_multi_account_list() { $option_seven = '

' . __('Buyer country', 'paypal-for-woocommerce-multi-account-management') . '

'; $option_seven .= ''; - + $option_fifteen = '

' . __('Shipping Class', 'paypal-for-woocommerce-multi-account-management') . '

'; $option_fifteen .= ''; - - $option_eight = '

' . apply_filters('angelleye_multi_account_display_category_label',__('Product categories', 'paypal-for-woocommerce-multi-account-management')) . '

'; + + $option_eight = '

' . apply_filters('angelleye_multi_account_display_category_label', __('Product categories', 'paypal-for-woocommerce-multi-account-management')) . '

'; $option_eight .= ''; $option_nine = '

' . __('Product tags', 'paypal-for-woocommerce-multi-account-management') . '

'; $option_nine .= ''; @@ -522,7 +518,7 @@ public function angelleye_display_multi_account_list() { echo sprintf(' - + %3$s %4$s @@ -531,47 +527,97 @@ public function angelleye_display_multi_account_list() { $this->angelleye_multi_account_tooltip_box(); } - public function angelleye_multi_account_tooltip_box() { + public function angelleye_multi_account_settings_fields() { + if (!empty($_POST['global_commission_microprocessing_save'])) { + update_option('global_ec_site_owner_commission', wc_clean($_POST['global_ec_site_owner_commission'])); + update_option('global_ec_site_owner_commission_label', wc_clean($_POST['global_ec_site_owner_commission_label'])); + update_option('global_automatic_rule_creation_enable', wc_clean($_POST['global_automatic_rule_creation_enable'])); + update_option('global_automatic_rule_creation_testmode', wc_clean($_POST['global_automatic_rule_creation_testmode'])); + $this->message = __('Your settings have been saved.', 'paypal-for-woocommerce-multi-account-management'); + } + if (!empty($this->message)) { + echo '

' . esc_html($this->message) . '

'; + } $global_ec_site_owner_commission = get_option('global_ec_site_owner_commission', ''); $global_ec_site_owner_commission_label = get_option('global_ec_site_owner_commission_label', ''); + $global_automatic_rule_creation_enable = get_option('global_automatic_rule_creation_enable', ''); + $global_automatic_rule_creation_testmode = get_option('global_automatic_rule_creation_testmode', ''); ?> -
+
- - - - - - - - - - - - -
- -
- - - -
-
+ + + + + +
+ +
+ + + + + + + +
+ +
+ + + + ' . __('Dokan Settings', 'paypal-for-woocommerce-multi-account-management') . ''; + } elseif(class_exists('WCV_Vendors')) { + echo '

' . __('WC Vendors Settings', 'paypal-for-woocommerce-multi-account-management') . '

'; + } + ?> + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+ +