public static function vendor_main_header() { // Remove the basic shop description from the loop remove_action('woocommerce_before_main_content', array('WCV_Vendor_Shop', 'shop_description'), 30); if (WCV_Vendors::is_vendor_page()) { $vendor_shop = urldecode(get_query_var('vendor_shop')); $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop); $shop_name = get_user_meta($vendor_id, 'pv_shop_name', true); // Shop description $has_html = get_user_meta($vendor_id, 'pv_shop_html_enabled', true); $global_html = WC_Vendors::$pv_options->get_option('shop_html_enabled'); $description = do_shortcode(get_user_meta($vendor_id, 'pv_shop_description', true)); $shop_description = $global_html || $has_html ? wpautop(wptexturize(wp_kses_post($description))) : sanitize_text_field($description); $seller_info = $global_html || $has_html ? wpautop(get_user_meta($vendor_id, 'pv_seller_info', true)) : sanitize_text_field(get_user_meta($vendor_id, 'pv_seller_info', true)); $vendor = get_userdata($vendor_id); $vendor_email = $vendor->user_email; $vendor_login = $vendor->user_login; do_action('wcv_before_main_header', $vendor_id); wc_get_template('vendor-main-header.php', array('vendor' => $vendor, 'vendor_id' => $vendor_id, 'shop_name' => $shop_name, 'shop_description' => $shop_description, 'seller_info' => $seller_info, 'vendor_email' => $vendor_email, 'vendor_login' => $vendor_login), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/'); do_action('wcv_after_main_header', $vendor_id); } }