/** * Show the PayPal field and commision due table * * @param unknown $user */ public function show_extra_profile_fields($user) { if (!WCV_Vendors::is_vendor($user->ID) && !WCV_Vendors::is_pending($user->ID)) { return; } ?> <h3><?php _e('WC Vendors', 'wcvendors'); ?> </h3> <table class="form-table"> <tbody> <?php do_action('wcvendors_admin_before_shop_html', $user); ?> <tr> <th scope="row">Shop HTML</th> <td> <label for="pv_shop_html_enabled"> <input name="pv_shop_html_enabled" type="checkbox" id="pv_shop_html_enabled" <?php checked(true, get_user_meta($user->ID, 'pv_shop_html_enabled', true), $echo = true); ?> /> <?php _e('Enable HTML for the shop description', 'wcvendors'); ?> </label> </td> </tr> <?php do_action('wcvendors_admin_after_shop_html', $user); ?> <tr> <th><label for="pv_shop_name"><?php _e('Shop name', 'wcvendors'); ?> </label></th> <td><input type="text" name="pv_shop_name" id="pv_shop_name" value="<?php echo get_user_meta($user->ID, 'pv_shop_name', true); ?> " class="regular-text"> </td> </tr> <?php do_action('wcvendors_admin_after_shop_name', $user); ?> <tr> <th><label for="pv_paypal"><?php _e('PayPal E-mail', 'wcvendors'); ?> <span class="description">(<?php _e('required', 'wcvendors'); ?> )</span></label></th> <td><input type="email" name="pv_paypal" id="pv_paypal" value="<?php echo get_user_meta($user->ID, 'pv_paypal', true); ?> " class="regular-text"> </td> </tr> <?php do_action('wcvendors_admin_after_paypal', $user); ?> <tr> <th><label for="pv_custom_commission_rate"><?php _e('Commission rate', 'wcvendors'); ?> (%)</label></th> <td><input type="number" step="0.01" max="100" min="0" name="pv_custom_commission_rate" placeholder="<?php _e('Leave blank for default', 'wcvendors'); ?> " id="pv_custom_commission_rate" value="<?php echo get_user_meta($user->ID, 'pv_custom_commission_rate', true); ?> " class="regular-text"> </td> </tr> <?php do_action('wcvendors_admin_after_commission_due', $user); ?> <tr> <th><label for="wcv_give_vendor_tax"><?php _e('Give Tax', 'wcvendors'); ?> (%)</label></th> <td> <label for="wcv_give_vendor_tax"> <input name="wcv_give_vendor_tax" type="checkbox" id="wcv_give_vendor_tax" <?php checked(true, get_user_meta($user->ID, 'wcv_give_vendor_tax', true), $echo = true); ?> /> <?php _e('Tax override for vendor', 'wcvendors'); ?> </label> </td> </tr> <?php do_action('wcvendors_admin_after_give_tax', $user); ?> <tr> <th><label for="wcv_give_vendor_shipping"><?php _e('Give Shipping', 'wcvendors'); ?> (%)</label></th> <td> <label for="wcv_give_vendor_shipping"> <input name="wcv_give_vendor_shipping" type="checkbox" id="wcv_give_vendor_shipping" <?php checked(true, get_user_meta($user->ID, 'wcv_give_vendor_shipping', true), $echo = true); ?> /> <?php _e('Shipping override for vendor', 'wcvendors'); ?> </label> </td> </tr> <?php do_action('wcvendors_admin_after_give_shipping', $user); ?> <tr> <th><label for="pv_seller_info"><?php _e('Seller info', 'wcvendors'); ?> </label></th> <td><?php wp_editor(get_user_meta($user->ID, 'pv_seller_info', true), 'pv_seller_info'); ?> </td> </tr> <?php do_action('wcvendors_admin_after_seller_info', $user); ?> <tr> <th><label for="pv_shop_description"><?php _e('Shop description', 'wcvendors'); ?> </label> </th> <td><?php wp_editor(get_user_meta($user->ID, 'pv_shop_description', true), 'pv_shop_description'); ?> </td> </tr> <?php do_action('wcvendors_admin_after_shop_description', $user); ?> </tbody> </table> <?php }
<?php if (function_exists('wc_print_notices')) { wc_print_notices(); } else { global $woocommerce; wc_print_notices(); } ?> <?php if (WCV_Vendors::is_pending(get_current_user_id())) { ?> <p><?php _e('Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!', 'wcvendors'); ?> </p> <?php } else { ?> <p><?php _e('Your account is not setup as a vendor yet. If you would like to register, please complete this page!', 'wcvendors'); ?> </p> <?php if (WC_Vendors::$pv_options->get_option('show_vendor_registration')) { ?>