4.5 KiB
4.5 KiB
Architecture
Generated by /paul:map-codebase — 2026-04-26
Overview
Production e-learning platform. Courses are WooCommerce products. Users browse, reserve/buy spots, and join a bbPress forum community. All page layouts are built via Divi Visual Builder; PHP customizations live in the child theme.
Directory Structure
szkoleniauryzaj.pl/
├── wp-config.php — DB config, WP settings, filesystem perms
├── .htaccess — Apache rewrites + Wordfence WAF rules
├── .user.ini — Wordfence WAF auto_prepend_file
├── cron-products.php — CUSTOM: auto-unpublish products past offer end date
├── wp-content/
│ ├── themes/
│ │ ├── body-relax/ — ACTIVE child theme (all custom code here)
│ │ ├── Divi/ — Parent theme (53 MB, do NOT edit)
│ │ └── twentytwentytwo/ — Inactive
│ ├── plugins/ — 45 plugins (~200 MB total)
│ ├── mu-plugins/
│ │ └── installatron_hide_status_test.php — Disables WP auto-update nag
│ └── uploads/ — Media (server-only, not in repo)
├── .vscode/
│ ├── ftp-kr.json — FTP deployment config
│ ├── sftp.json — SFTP alternative config
│ └── settings.json — SCSS compiler config
└── .paul/ — Project management (not deployed)
Active Child Theme: body-relax
body-relax/
├── functions.php — WooCommerce hooks, button text, stock display
├── style.css — Theme header + responsive CSS (981/768/480px breakpoints)
├── screenshot.jpg — Theme preview
└── divi-children-engine/
├── divi_children_engine.php — Loader (includes all engine files)
├── css/
│ └── custom-metabox.css — Admin metabox styling
└── includes/
├── divi_children_functions.php — 2060 lines: Divi customizer extensions, CSS injection
├── custom_codes.php — Admin UI for CSS classes/IDs + "magic codes"
└── divi-mods/
└── divi_mod_functions.php — Overrides et_pb_blog and et_pb_cta shortcodes
Customization Layers (top → bottom)
- Divi Visual Builder — Page/post content (drag-drop, stored as post meta)
- body-relax/functions.php — WooCommerce filters (stock text, CTA button labels)
- divi-children-engine — Customizer extensions, admin UI, Divi shortcode overrides
- Divi parent theme — Core styling, builder components, page templates
- WooCommerce — Product system (courses = products, bookings = orders)
- 45 Plugins — SEO, analytics, payments, security, media feeds
- WordPress core — Database, hook system, REST API
Key Custom Functions
| File | Function | What it does |
|---|---|---|
functions.php:30 |
wcs_custom_get_availability() |
Polish stock text: "Duża ilość wolnych miejsc", countdown for last 1-4 spots, "WSZYSTKIE MIEJSCA WYKUPIONE" |
functions.php:92 |
bbloomer_custom_add_to_cart_single_product() |
Changes "Add to Cart" by category: webinar/book → "Kup teraz", course → "Rezerwuj miejsce" |
functions.php:108 |
bbloomer_archive_custom_cart_button_text() |
Same logic for archive/shop pages |
cron-products.php |
(standalone) | Reads ACF end_date_of_the_offer, sets product to draft when offer expires |
Hooks Registered in functions.php
| Type | Hook | Function |
|---|---|---|
add_action |
wp_enqueue_scripts |
dce_load_divi_stylesheet() — enqueues Divi parent CSS |
add_filter |
woocommerce_get_availability |
wcs_custom_get_availability() |
add_filter |
woocommerce_product_single_add_to_cart_text |
bbloomer_custom_add_to_cart_single_product() |
add_filter |
woocommerce_product_add_to_cart_text |
bbloomer_archive_custom_cart_button_text() |
Data Flow: Course Purchase
User → Shop/Archive page
→ WooCommerce product (course) with custom "Rezerwuj miejsce" button
→ Cart → Checkout (with NIP field, custom fields)
→ PayU payment gateway (BLIK/card/bank transfer)
→ Order confirmation → bbPress forum access (community)
Database
- Name:
garbary_szkury - Prefix:
wp_ - Host: localhost
- Key custom data: ACF fields on products (e.g.,
end_date_of_the_offer)