| @@ -107,11 +107,18 @@ | ||
| 107 | 107 | \FluentCart\App\Hooks\Handlers\BlockEditors\StockBlock::register(); |
| 108 | 108 | \FluentCart\App\Hooks\Handlers\BlockEditors\SoldOutBadgeBlockEditor::register(); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | +// Registered whether or not the reviews module is active: the block ships | |
| 112 | +// inside the Shop App, Product Info and Related Products card templates, so | |
| 113 | +// an unregistered block would greet the editor with "your site doesn't | |
| 114 | +// include support for this block" on every card. With the module off it | |
| 115 | +// stays out of the inserter and renders nothing, in the editor and on the | |
| 116 | +// page — see ProductRatingBlockEditor. | |
| 117 | +\FluentCart\App\Hooks\Handlers\BlockEditors\ProductRatingBlockEditor::register(); | |
| 118 | + | |
| 111 | 119 | if (\FluentCart\Api\ModuleSettings::isActive('reviews') && class_exists(\FluentCart\App\Hooks\Handlers\BlockEditors\ProductReviewsBlockEditor::class)) { |
| 112 | 120 | \FluentCart\App\Hooks\Handlers\BlockEditors\ProductReviewsBlockEditor::register(); |
| 113 | - \FluentCart\App\Hooks\Handlers\BlockEditors\ProductRatingBlockEditor::register(); | |
| 114 | 121 | \FluentCart\App\Hooks\Handlers\BlockEditors\WriteAReviewButtonBlockEditor::register(); |
| 115 | 122 | \FluentCart\App\Hooks\Handlers\BlockEditors\ProductReviewFormBlockEditor::register(); |
| 116 | 123 | \FluentCart\App\Hooks\Handlers\BlockEditors\ProductReviewSummaryBlockEditor::register(); |
| 117 | 124 | \FluentCart\App\Hooks\Handlers\BlockEditors\ProductReviewList\ProductReviewListBlockEditor::register(); |