assistants.php
3 years ago
chatbot-chatgpt.css
3 years ago
chatbot-chatgpt.scss
3 years ago
chatbot.php
3 years ago
chatbot_chats.php
3 years ago
chatbot_logs.php
3 years ago
assistants.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | class Meow_MWAI_Modules_Assistants { |
| 4 | private $core = null; |
| 5 | |
| 6 | public function __construct() { |
| 7 | global $mwai_core; |
| 8 | $this->core = $mwai_core; |
| 9 | |
| 10 | // Add Metadata Metabox to Product Post Type Edit Page |
| 11 | add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); |
| 12 | } |
| 13 | |
| 14 | function add_meta_boxes() { |
| 15 | if ( get_post_type() !== 'product' ) { |
| 16 | return; |
| 17 | } |
| 18 | add_meta_box( 'meow-mwai-metadata', |
| 19 | __( 'AI Engine', 'meow-mwai' ), |
| 20 | array( $this, 'render_metadata_metabox' ), |
| 21 | 'product', 'side', 'high' |
| 22 | ); |
| 23 | } |
| 24 | |
| 25 | function render_metadata_metabox( $post ) { |
| 26 | $this->core->uiNeeded = true; |
| 27 | echo '<div id="mwai-admin-wcAssistant"></div>'; |
| 28 | } |
| 29 | } |