WC_Install::install_actions()
Install actions when a update button is clicked within the admin area.
This function is hooked into admin_init to affect admin only.
Method of the class: WC_Install{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Install::install_actions();
WC_Install::install_actions() WC Install::install actions code WC 9.4.2
public static function install_actions() { if ( ! empty( $_GET['do_update_woocommerce'] ) ) { // WPCS: input var ok. check_admin_referer( 'wc_db_update', 'wc_db_update_nonce' ); self::update(); WC_Admin_Notices::add_notice( 'update', true ); if ( ! empty( $_GET['return_url'] ) ) { // WPCS: input var ok. $return_url = esc_url_raw( wp_unslash( $_GET['return_url'] ) ); wp_safe_redirect( $return_url ); // WPCS: input var ok. } } }