| @@ -28,8 +28,17 @@ | ||
| 28 | 28 | */ |
| 29 | 29 | public static $is_module_preview = false; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | + * Initialize the module's option group definitions. | |
| 33 | + * | |
| 34 | + * @return array<int, array<string, mixed>> Array of option group arrays. | |
| 35 | + */ | |
| 36 | + protected function init_option_groups() { | |
| 37 | + return require MERCHANT_DIR . 'inc/modules/' . self::MODULE_ID . '/admin/options.php'; | |
| 38 | + } | |
| 39 | + | |
| 40 | + /** | |
| 32 | 41 | * Constructor. |
| 33 | 42 | * |
| 34 | 43 | */ |
| 35 | 44 | public function __construct() { |
| @@ -51,18 +60,20 @@ | ||
| 51 | 60 | 'layout' => 'layout-shopify', |
| 52 | 61 | 'sticky_totals_box' => 0, |
| 53 | 62 | ); |
| 54 | 63 | |
| 55 | - // Mount preview url. | |
| 56 | - $preview_url = site_url( '/' ); | |
| 57 | - | |
| 58 | - if ( function_exists( 'wc_get_page_id' ) ) { | |
| 59 | - $preview_url = get_permalink( wc_get_page_id( 'checkout' ) ); | |
| 60 | - } | |
| 61 | - | |
| 62 | 64 | // Module data. |
| 63 | 65 | $this->module_data = Merchant_Admin_Modules::$modules_data[ self::MODULE_ID ]; |
| 64 | - $this->module_data[ 'preview_url' ] = $preview_url; | |
| 66 | + | |
| 67 | + // AI prompt examples. | |
| 68 | + $this->ai_examples = array( | |
| 69 | + 'blurb' => esc_html__( 'See what AI can do for your checkout, from switching between the Shopify-style, one-step, and multi-step layouts to keeping the order totals box sticky as shoppers scroll.', 'merchant' ), | |
| 70 | + 'prompts' => array( | |
| 71 | + esc_html__( 'Explore the abilities WPVibe gives you access to, then switch my checkout to the one-step layout', 'merchant' ), | |
| 72 | + esc_html__( 'Check what abilities you have available through WPVibe, then change the checkout to the multi-step layout instead', 'merchant' ), | |
| 73 | + esc_html__( 'Look at your available WPVibe abilities, then switch to the Shopify-style layout and keep the order totals box sticky as shoppers scroll', 'merchant' ), | |
| 74 | + ), | |
| 75 | + ); | |
| 65 | 76 | |
| 66 | 77 | // Module options path. |
| 67 | 78 | $this->module_options_path = MERCHANT_DIR . 'inc/modules/' . self::MODULE_ID . '/admin/options.php'; |
| 68 | 79 | |