progress = $progress; } public function register(): void { \add_filter( 'admin_footer_text', [ $this, 'footerText' ] ); \add_action( 'admin_notices', [ $this, 'renderNotice' ] ); \add_action( 'admin_post_' . self::ACTION, [ $this, 'handleAction' ] ); } /** * @param mixed $text * @return mixed */ public function footerText( $text ) { if ( ! $this->isPluginScreen() ) { return $text; } return sprintf( \esc_html__( 'Enjoying Agent001? Please rate us %s on WordPress.org. Thank you!', 'agent001-support-assistant-for-woocommerce' ), '★★★★★' ); } public function renderNotice(): void { if ( ! $this->isPluginScreen() || ! \current_user_can( SettingsPage::CAPABILITY ) || ! $this->isDue() ) { return; } echo '
'; \esc_html_e( 'Agent001 is up and running in your store. If the assistant helps your shoppers, would you mind leaving a quick review on WordPress.org? It really helps us grow.', 'agent001-support-assistant-for-woocommerce' ); echo '
'; echo '' . \esc_html__( 'Rate Agent001', 'agent001-support-assistant-for-woocommerce' ) . ' '; echo '' . \esc_html__( 'Maybe later', 'agent001-support-assistant-for-woocommerce' ) . ' '; echo '' . \esc_html__( "Don't ask again", 'agent001-support-assistant-for-woocommerce' ) . ''; echo '