PATH:
home
/
letacommog
/
aacote
/
wp-content
/
plugins
/
dc-woocommerce-multi-vendor
/
admin
<?php class WCMp_Settings_Capabilities_Order { /** * Holds the values to be used in the fields callbacks */ private $options; private $tab; private $subsection; /** * Start up */ public function __construct($tab, $subsection) { $this->tab = $tab; $this->subsection = $subsection; $this->options = get_option("wcmp_{$this->tab}_{$this->subsection}_settings_name"); $this->settings_page_init(); } /** * Register and add settings */ public function settings_page_init() { global $WCMp; $settings_tab_options = array("tab" => "{$this->tab}", "ref" => &$this, "subsection" => "{$this->subsection}", "sections" => array( "vendor_order" => array( "title" => __('Order Notes', 'dc-woocommerce-multi-vendor'), "fields" => array( "is_vendor_view_comment" => array('title' => __('View Order Note', 'dc-woocommerce-multi-vendor'), 'type' => 'checkbox', 'id' => 'is_vendor_view_comment', 'label_for' => 'is_vendor_view_comment', 'name' => 'is_vendor_view_comment', 'text' => __('Vendor can see order notes.', 'dc-woocommerce-multi-vendor'), 'value' => 'Enable'), // Checkbox "is_vendor_submit_comment" => array('title' => __('Add Order Note', 'dc-woocommerce-multi-vendor'), 'type' => 'checkbox', 'id' => 'is_vendor_submit_comment', 'label_for' => 'is_vendor_submit_comment', 'name' => 'is_vendor_submit_comment', 'text' => __('Vendor can add order notes.', 'dc-woocommerce-multi-vendor'), 'value' => 'Enable'), // Checkbox ) ) ) ); $WCMp->admin->settings->settings_field_withsubtab_init(apply_filters("settings_{$this->tab}_{$this->subsection}_tab_options", $settings_tab_options)); } /** * Sanitize each setting field as needed * * @param array $input Contains all settings fields as array keys */ public function wcmp_capabilities_order_settings_sanitize($input) { global $WCMp; $new_input = array(); $hasError = false; if (isset($input['is_vendor_view_comment'])) { $new_input['is_vendor_view_comment'] = sanitize_text_field($input['is_vendor_view_comment']); } if (isset($input['is_vendor_submit_comment'])) { $new_input['is_vendor_submit_comment'] = sanitize_text_field($input['is_vendor_submit_comment']); } if (!$hasError) { add_settings_error( "wcmp_{$this->tab}_{$this->subsection}_settings_name", esc_attr("wcmp_{$this->tab}_{$this->subsection}_settings_admin_updated"), __('Vendor Settings Updated', 'dc-woocommerce-multi-vendor'), 'updated' ); } return apply_filters("settings_{$this->tab}_{$this->subsection}_tab_new_input", $new_input, $input); } }
[+]
..
[-] class-wcmp-settings-payment-stripe_gateway.php
[edit]
[-] class-wcmp-settings-capabilities-product.php
[edit]
[-] class-wcmp-settings-payment-paypal_payout.php
[edit]
[-] class-wcmp-settings-payment.php
[edit]
[-] class-wcmp-settings-vendor-general.php
[edit]
[-] class-wcmp-settings-vendor-registration.php
[edit]
[-] class-wcmp-settings-general.php
[edit]
[-] class-wcmp-settings-vendor-dashboard.php
[edit]
[-] class-wcmp-settings-general-policies.php
[edit]
[-] class-wcmp-settings-vendors.php
[edit]
[-] class-wcmp-admin-setup-wizard.php
[edit]
[-] class-wcmp-settings-general-customer_support_details.php
[edit]
[-] class-wcmp-settings-frontend.php
[edit]
[-] class-wcmp-settings-to_do_list.php
[edit]
[-] class-wcmp-settings-payment-paypal_masspay.php
[edit]
[-] class-wcmp-settings-capabilities-miscellaneous.php
[edit]
[-] class-wcmp-settings-capabilities-order.php
[edit]
[-] class-wcmp-settings.php
[edit]
[-] class-wcmp-settings-wcmp-addons.php
[edit]
[-] class-wcmp-settings-notices.php
[edit]