alias( 'importExport', 'surecart.import_export' ); } /** * Bootstrap the service. * * @param \Pimple\Container $container Service container. * @return void */ public function bootstrap( $container ) { add_action( 'admin_notices', [ $this, 'renderExportCreatedNotice' ] ); } /** * Show a success notice after an export is created (export_created=1 redirect). * * Only on our pages — the export flow always returns to a SureCart list page. * * @return void */ public function renderExportCreatedNotice() { $page = isset( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $_GET['export_created'] ) || 0 !== strpos( $page, 'sc-' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended return; } ?>