| @@ -13,8 +13,15 @@ | ||
| 13 | 13 | protected static array $cachedPages = []; |
| 14 | 14 | |
| 15 | 15 | public function pages(): array |
| 16 | 16 | { |
| 17 | + // Lets addons register their own generatable pages ('key' => title + content), | |
| 18 | + // so the Pages Setup "+" create button and onboarding can build them. | |
| 19 | + return apply_filters('fluent_cart/generatable_pages', $this->corePages()); | |
| 20 | + } | |
| 21 | + | |
| 22 | + public function corePages(): array | |
| 23 | + { | |
| 17 | 24 | return [ |
| 18 | 25 | 'checkout' => [ |
| 19 | 26 | 'title' => 'Checkout', |
| 20 | 27 | 'content' => '[fluent_cart_checkout]' |
| @@ -25,8 +32,12 @@ | ||
| 25 | 32 | ], |
| 26 | 33 | 'receipt' => [ |
| 27 | 34 | 'title' => 'Receipt', |
| 28 | 35 | 'content' => '[fluent_cart_receipt]' |
| 36 | + ], | |
| 37 | + 'order_review' => [ | |
| 38 | + 'title' => 'Review Your Order', | |
| 39 | + 'content' => '[fluent_cart_order_review]' | |
| 29 | 40 | ], |
| 30 | 41 | 'shop' => [ |
| 31 | 42 | 'title' => 'Shop', |
| 32 | 43 | 'content' => static::getShopPageContent() |