WC_Admin::update_footer_versionpublicWC 1.0

Update the footer version text.

Method of the class: WC_Admin{}

Returns

String.

Usage

$WC_Admin = new WC_Admin();
$WC_Admin->update_footer_version( $version );
$version(string) (required)
The current version string.

Changelog

Since $VID:$

WC_Admin::update_footer_version() code WC 10.3.3

public function update_footer_version( $version ) {
	if ( ! function_exists( 'wc_get_screen_ids' ) ) {
		return $version;
	}
	$current_screen = get_current_screen();
	$wc_pages       = array_merge( wc_get_screen_ids(), array( 'woocommerce_page_wc-admin' ) );

	// Set only WC pages.
	$wc_pages = array_diff( $wc_pages, array( 'profile', 'user-edit' ) );

	// Check to make sure we're on a WooCommerce admin page.
	/**
	 * Filter to determine if update footer text should be displayed.
	 *
	 * @since 2.3
	 */
	if ( isset( $current_screen->id ) && apply_filters( 'woocommerce_display_update_footer_text', in_array( $current_screen->id, $wc_pages, true ) ) ) {
		// Replace WordPress version with WooCommerce version.
		$version = sprintf(
			/* translators: %s: WooCommerce version */
			__( 'Version %s', 'woocommerce' ),
			esc_html( WC()->version )
		);
	}

	return $version;
}