WC_Helper::admin_notices()

Various Helper-related admin notices.


Description Description


Source Source

File: includes/admin/helper/class-wc-helper.php

1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
public static function admin_notices() {
    if ( apply_filters( 'woocommerce_helper_suppress_admin_notices', false ) ) {
        return;
    }
 
    $screen    = get_current_screen();
    $screen_id = $screen ? $screen->id : '';
 
    if ( 'update-core' !== $screen_id ) {
        return;
    }
 
    // Don't nag if Woo doesn't have an update available.
    if ( ! self::_woo_core_update_available() ) {
        return;
    }
 
    // Add a note about available extension updates if Woo core has an update available.
    $notice = self::_get_extensions_update_notice();
    if ( ! empty( $notice ) ) {
        echo '<div class="updated woocommerce-message"><p>' . $notice . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    }
}


Top ↑

User Contributed Notes User Contributed Notes

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