Astra_Theme_Extension::enable_disable_beta_updates()

Ajax handler to enable / disable the beta updates for Astra Theme and Astra Pro.


Description


Return

(void)


Source

File: classes/class-astra-theme-extension.php

		public function enable_disable_beta_updates() {
			check_ajax_referer( 'astra-addon-module-nonce', 'nonce' );

			$status = isset( $_POST['status'] ) ? sanitize_text_field( $_POST['status'] ) : false;

			if ( false !== $status ) {
				Astra_Admin_Helper::update_admin_settings_option( '_astra_beta_updates', $status, true );
				wp_send_json_success();
			}

			wp_send_json_error();
		}

Changelog

Changelog
Version Description
1.5.1 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.