register(); ( new Rest() )->register(); /** * Fires once MadeCost is ready, so an add-on can hook in. */ do_action( 'madecost_loaded' ); } /** * Admin notice shown when WooCommerce is not active. It appears on the Plugins screen only (where the * merchant manages plugins), never elsewhere in the admin, and it can be dismissed. */ public function notice_woocommerce_missing(): void { $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null; if ( ! $screen || 'plugins' !== $screen->id || ! current_user_can( 'activate_plugins' ) ) { return; } echo '

' . esc_html__( 'MadeCost needs WooCommerce to be installed and active.', 'madecost' ) . '

'; } }