WordPress at Your Fingertips
function is not described

WC_Email::admin_actions() protected WC 1.0

Admin actions.

{} It's a method of the class: WC_Email{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->admin_actions();

Code of WC_Email::admin_actions() WC 5.9.0

protected function admin_actions() {
	// Handle any actions.
	if (
		( ! empty( $this->template_html ) || ! empty( $this->template_plain ) )
		&& ( ! empty( $_GET['move_template'] ) || ! empty( $_GET['delete_template'] ) )
		&& 'GET' === $_SERVER['REQUEST_METHOD'] // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated
	) {
		if ( empty( $_GET['_wc_email_nonce'] ) || ! wp_verify_nonce( wc_clean( wp_unslash( $_GET['_wc_email_nonce'] ) ), 'woocommerce_email_template_nonce' ) ) {
			wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );
		}

		if ( ! current_user_can( 'edit_themes' ) ) {
			wp_die( esc_html__( 'You don’t have permission to do this.', 'woocommerce' ) );
		}

		if ( ! empty( $_GET['move_template'] ) ) {
			$this->move_template_action( wc_clean( wp_unslash( $_GET['move_template'] ) ) );
		}

		if ( ! empty( $_GET['delete_template'] ) ) {
			$this->delete_template_action( wc_clean( wp_unslash( $_GET['delete_template'] ) ) );
		}
	}
}