hookSuffix === '' || $hookSuffix !== $this->hookSuffix) { return; }
wp_register_style('facetcore-help', false, [], FACETCORE_VERSION);
wp_enqueue_style('facetcore-help');
wp_add_inline_style('facetcore-help', self::CSS);
}
public function menu(): void
{
$this->hookSuffix = (string) add_submenu_page(
'edit.php?post_type=' . TableConfiguration::TYPE,
__('FacetCore Help & Documentation', 'facetcore'),
__('Help', 'facetcore'),
'manage_woocommerce',
'facetcore-help',
[$this, 'page']
);
}
public function page(): void
{
if (!current_user_can('manage_woocommerce')) {
wp_die(esc_html__('You do not have permission to access this page.', 'facetcore'), '', ['response' => 403]);
}
$inline = ['strong' => [], 'em' => [], 'code' => ['class' => true]];
?>
- Install and activate WooCommerce: FacetCore requires WooCommerce for product catalog and attribute management.', 'facetcore'), $inline); ?>
- Install and activate FacetCore: Verify that the FacetCore menu item appears in your WordPress admin sidebar.', 'facetcore'), $inline); ?>
- Create global WooCommerce product attributes: Go to Products → Attributes and define global attributes (e.g. Color, Size, Brand, RAM Type).', 'facetcore'), $inline); ?>
- Assign attributes to products: Edit your products, open the Attributes tab, select global attributes, assign terms, and save.', 'facetcore'), $inline); ?>
- Build the FacetCore index: Go to FacetCore → Index and click Rebuild Index to index your assigned attributes.', 'facetcore'), $inline); ?>
- Create a Finder: Navigate to FacetCore → Add Finder to begin configuring a new discovery view.', 'facetcore'), $inline); ?>
- Choose product source: Keep All products or select specific product categories.', 'facetcore'), $inline); ?>
- Choose filters: Check the global WooCommerce attributes you want visitors to filter by.', 'facetcore'), $inline); ?>
- Choose result layout: Select Table, Grid, or Table + Grid.', 'facetcore'), $inline); ?>
- Publish: Click the Publish button in the top-right corner to save and activate your Finder.', 'facetcore'), $inline); ?>
- Copy the shortcode: Locate the Shortcode box in the sidebar and click Copy shortcode.', 'facetcore'), $inline); ?>
- Insert shortcode into any page: Paste the shortcode (e.g.
[facetcore id="123"]) into any page, post, or block editor.', 'facetcore'), $inline); ?>
Finder is an independent product-discovery configuration. Each Finder maintains its own:', 'facetcore'), $inline); ?>
- All products: Evaluates every published, catalog-visible product in your store.', 'facetcore'), $inline); ?>
- Selected categories: Restricts the Finder strictly to chosen WooCommerce categories.', 'facetcore'), $inline); ?>
- Subcategories: When a parent category is selected, products in its descendant subcategories are automatically included.', 'facetcore'), $inline); ?>
- Source: Any global taxonomy created under Products → Attributes is eligible.', 'facetcore'), $inline); ?>
- Selection: Checked attributes appear as faceted filters on the frontend.', 'facetcore'), $inline); ?>
- Ordering: Drag-and-drop or reorder attributes in the editor to define their display order.', 'facetcore'), $inline); ?>
- 1.0 Guardrails: Up to 10 active filters are supported. Selection operates on a single-select per facet model, mathematically guaranteeing that every clickable option leads to non-empty results.', 'facetcore'), $inline); ?>
- Product Name: Partial, case-insensitive keyword matching on product titles.', 'facetcore'), $inline); ?>
- SKU: Matches exact or partial product SKUs for instant lookups.', 'facetcore'), $inline); ?>
- Combined Filtering: Search queries seamlessly combine with active facet filters to narrow candidates in real time.', 'facetcore'), $inline); ?>
- Table: Pro comparison table with configurable columns.', 'facetcore'), $inline); ?>
- Grid: Visual, modern card grid ideal for retail, apparel, and consumer goods.', 'facetcore'), $inline); ?>
- Table + Grid (Pro): Enables both views and displays an interactive switcher so visitors can toggle between Table and Grid at will. You can choose which view is the default.', 'facetcore'), $inline); ?>
- Table columns (Pro): Choose and reorder which standard fields (SKU, Image, Name, Price, Stock, Add to Cart) and attribute columns appear.', 'facetcore'), $inline); ?>
- Grid card fields: Show optional SKU in Lite; Pro adds up to four global attributes.', 'facetcore'), $inline); ?>
- Products per page: Set pagination page size (default is 25).', 'facetcore'), $inline); ?>
- Facet counts: Display available product count next to each option label.', 'facetcore'), $inline); ?>
- Hide impossible values: Automatically suppress option values with zero matching products.', 'facetcore'), $inline); ?>
- Custom CSS (Pro): Add custom CSS rules scoped specifically to the Finder container.', 'facetcore'), $inline); ?>
- Why it exists: Standard WordPress meta queries become sluggish on large stores. FacetCore maintains optimized lookup tables (
wp_facetcore_*) for indexed filtering.', 'facetcore'), $inline); ?>
- Automatic Synchronization: Standard WooCommerce product edits and attribute assignments update the index automatically.', 'facetcore'), $inline); ?>
- When to Rebuild: Go to FacetCore → Index → Rebuild Index whenever you add new global attributes, import products via CSV/SQL, or notice discrepancy in counts.', 'facetcore'), $inline); ?>
[facetcore id="123"]
123 with your Finder ID (available on the Finders list screen or in the sidebar of the editor). Multiple Finders can be placed on different pages without conflict.', 'facetcore'), $inline); ?>
- Add to cart, while variable products show Select options linking directly to the product detail page.', 'facetcore'), $inline); ?>
Products → Attributes and assigned them to products. FacetCore uses global WooCommerce attributes for filtering.', 'facetcore'), $inline); ?>
Rebuild Index under FacetCore → Index.', 'facetcore'), $inline); ?>
FacetCore → Index → Rebuild Index to refresh all indexes.', 'facetcore'), $inline); ?>