Automattic\WooCommerce\Internal\StockNotifications\Frontend
MyAccountEndpoint::resend
Send the verification email again for a pending notification.
Method of the class: MyAccountEndpoint{}
No Hooks.
Returns
string|\WP_Error. Success notice text, or the error to show instead.
Usage
// private - for code of main (parent) class only $result = $this->resend( $notification );
- $notification(Notification) (required)
- The notification, already checked to belong to the current user.
MyAccountEndpoint::resend() MyAccountEndpoint::resend code WC 11.3.0
private function resend( Notification $notification ) {
$result = $this->notification_management_service->resend_verification_email( $notification );
if ( is_wp_error( $result ) ) {
return $result;
}
/* translators: %s: email address the verification email was sent to. */
return sprintf( __( 'Verification email sent to "%s". Please check your inbox!', 'woocommerce' ), $notification->get_user_email() );
}