public function registerAjaxAction() {
		if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
			return;
		}

		$action = $this->request->post( 'action', $this->request->get( 'action' ) );
		$action = sanitize_text_field( $action );

		add_action( "wp_ajax_{$action}", [$this, 'actionAjax'] );
		add_action( "wp_ajax_nopriv_{$action}", [$this, 'actionAjax'] );
	}
public function registerAjaxAction() {
		if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
			return;
		}

		$action = $this->request->post( 'action', $this->request->get( 'action' ) );
		$action = sanitize_text_field( $action );

		add_action( "wp_ajax_{$action}", [$this, 'actionAjax'] );
		add_action( "wp_ajax_nopriv_{$action}", [$this, 'actionAjax'] );
	}
public function registerAjaxAction ( ) { if ( ! defined ( 'DOING_AJAX' ) || ! DOING_AJAX ) { return ; } $ action = $ this -> request -> post ( 'action' , $ this -> request -> get ( 'action' ) ) ; $ action = sanitize_text_field ( $ action ) ; add_action ( "wp_ajax_{$action}" , [ $ this , 'actionAjax' ] ) ; add_action ( "wp_ajax_nopriv_{$action}" , [ $ this , 'actionAjax' ] ) ; }
Register ajax action to hook into current one.

@return void
Register ajax action to hook into current one .