/home/suroeste/public_html/wp-content/plugins/woocommerce/includes
NameSizeModeActions
abstracts/-0755rm
admin/-0755rm
blocks/-0755rm
cli/-0755rm
customizer/-0755rm
data-stores/-0755rm
emails/-0755rm
export/-0755rm
gateways/-0755rm
import/-0755rm
integrations/-0755rm
interfaces/-0755rm
legacy/-0755rm
libraries/-0755rm
log-handlers/-0755rm
payment-tokens/-0755rm
queue/-0755rm
react-admin/-0755rm
rest-api/-0755rm
shipping/-0755rm
shortcodes/-0755rm
theme-support/-0755rm
tracks/-0755rm
traits/-0755rm
walkers/-0755rm
wccom-site/-0755rm
widgets/-0755rm
class-wc-ajax.php1173950644editdlrm
class-wc-auth.php129620644editdlrm
class-wc-autoloader.php32090644editdlrm
class-wc-background-emailer.php46850644editdlrm
class-wc-background-updater.php35350644editdlrm
class-wc-breadcrumb.php97220644editdlrm
class-wc-cache-helper.php110470644editdlrm
class-wc-cart-fees.php34480644editdlrm
class-wc-cart-session.php182350644editdlrm
class-wc-cart-totals.php289270644editdlrm
class-wc-cart.php679020644editdlrm
class-wc-checkout.php480530644editdlrm
class-wc-cli.php17330644editdlrm
class-wc-comments.php162410644editdlrm
class-wc-countries.php500950644editdlrm
class-wc-coupon.php387700644editdlrm
class-wc-customer-download-log.php34520644editdlrm
class-wc-customer-download.php107020644editdlrm
class-wc-customer.php303900644editdlrm
class-wc-data-exception.php13210644editdlrm
class-wc-data-store.php67520644editdlrm
class-wc-datetime.php23100644editdlrm
class-wc-deprecated-action-hooks.php67460644editdlrm
class-wc-deprecated-filter-hooks.php75180644editdlrm
class-wc-discounts.php359100644editdlrm
class-wc-download-handler.php260800644editdlrm
class-wc-emails.php256960644editdlrm
class-wc-embed.php42840644editdlrm
class-wc-form-handler.php458100644editdlrm
class-wc-frontend-scripts.php273930644editdlrm
class-wc-geo-ip.php311360644editdlrm
class-wc-geolite-integration.php20360644editdlrm
class-wc-geolocation.php106930644editdlrm
class-wc-https.php44390644editdlrm
class-wc-install.php1023140644editdlrm
class-wc-integrations.php13080644editdlrm
class-wc-log-levels.php39920644editdlrm
class-wc-logger.php94820644editdlrm
class-wc-meta-data.php22600644editdlrm
class-wc-order-factory.php87280644editdlrm
class-wc-order-item-coupon.php41750644editdlrm
class-wc-order-item-fee.php90580644editdlrm
class-wc-order-item-meta.php59420644editdlrm
class-wc-order-item-product.php140270644editdlrm
class-wc-order-item-shipping.php80430644editdlrm
class-wc-order-item-tax.php66440644editdlrm
class-wc-order-item.php119280644editdlrm
class-wc-order-query.php26150644editdlrm
class-wc-order-refund.php57620644editdlrm
class-wc-order.php709450644editdlrm
class-wc-payment-gateways.php116320644editdlrm
class-wc-payment-tokens.php63900644editdlrm
class-wc-post-data.php209730644editdlrm
class-wc-post-types.php288200644editdlrm
class-wc-privacy-background-process.php17070644editdlrm
class-wc-privacy-erasers.php139380644editdlrm
class-wc-privacy-exporters.php150440644editdlrm
class-wc-privacy.php162050644editdlrm
class-wc-product-attribute.php71370644editdlrm
class-wc-product-download.php125470644editdlrm
class-wc-product-external.php49550644editdlrm
class-wc-product-factory.php36650644editdlrm
class-wc-product-grouped.php53490644editdlrm
class-wc-product-query.php22310644editdlrm
class-wc-product-simple.php19340644editdlrm
class-wc-product-variable.php226050644editdlrm
class-wc-product-variation.php172710644editdlrm
class-wc-query.php333850644editdlrm
class-wc-rate-limiter.php41000644editdlrm
class-wc-regenerate-images-request.php79230644editdlrm
class-wc-regenerate-images.php155670644editdlrm
class-wc-register-wp-admin-settings.php51710644editdlrm
class-wc-rest-authentication.php204480644editdlrm
class-wc-rest-exception.php2760644editdlrm
class-wc-session-handler.php153870644editdlrm
class-wc-shipping-rate.php56380644editdlrm
class-wc-shipping-zone.php133920644editdlrm
class-wc-shipping-zones.php41060644editdlrm
class-wc-shipping.php118460644editdlrm
class-wc-shortcodes.php191160644editdlrm
class-wc-structured-data.php191720644editdlrm
class-wc-tax.php379690644editdlrm
class-wc-template-loader.php219080644editdlrm
class-wc-tracker.php379650644editdlrm
class-wc-validation.php59290644editdlrm
class-wc-webhook.php299460644editdlrm
class-woocommerce.php427290644editdlrm
wc-account-functions.php132050644editdlrm
wc-attribute-functions.php211020644editdlrm
wc-cart-functions.php193800644editdlrm
wc-conditional-functions.php142520644editdlrm
wc-core-functions.php817570644editdlrm
wc-coupon-functions.php28190644editdlrm
wc-deprecated-functions.php349020644editdlrm
wc-formatting-functions.php465890644editdlrm
wc-notice-functions.php82120644editdlrm
wc-order-functions.php383510644editdlrm
wc-order-item-functions.php51530644editdlrm
wc-page-functions.php70990644editdlrm
wc-product-functions.php520200644editdlrm
wc-rest-functions.php114600644editdlrm
wc-stock-functions.php138660644editdlrm
wc-template-functions.php1238920644editdlrm
wc-template-hooks.php128590644editdlrm
wc-term-functions.php211550644editdlrm
wc-update-functions.php846550644editdlrm
wc-user-functions.php292470644editdlrm
wc-webhook-functions.php58550644editdlrm
wc-widget-functions.php20630644editdlrm
Edit: /home/suroeste/public_html/wp-content/plugins/woocommerce/includes/wc-notice-functions.php (8212B)
session->get( 'wc_notices', array() ); if ( isset( $all_notices[ $notice_type ] ) && is_array( $all_notices[ $notice_type ] ) ) { $notice_count = count( $all_notices[ $notice_type ] ); } elseif ( empty( $notice_type ) ) { foreach ( $all_notices as $notices ) { if ( is_countable( $notices ) ) { $notice_count += count( $notices ); } } } return $notice_count; } /** * Check if a notice has already been added. * * @since 2.1 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The name of the notice type - either error, success or notice. * @return bool */ function wc_has_notice( $message, $notice_type = 'success' ) { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' ); return false; } $notices = WC()->session->get( 'wc_notices', array() ); $notices = isset( $notices[ $notice_type ] ) ? $notices[ $notice_type ] : array(); return array_search( $message, wp_list_pluck( $notices, 'notice' ), true ) !== false; } /** * Add and store a notice. * * @since 2.1 * @version 3.9.0 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The name of the notice type - either error, success or notice. * @param array $data Optional notice data. */ function wc_add_notice( $message, $notice_type = 'success', $data = array() ) { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' ); return; } $notices = WC()->session->get( 'wc_notices', array() ); // Backward compatibility. if ( 'success' === $notice_type ) { $message = apply_filters( 'woocommerce_add_message', $message ); } $message = apply_filters( 'woocommerce_add_' . $notice_type, $message ); if ( ! empty( $message ) ) { $notices[ $notice_type ][] = array( 'notice' => $message, 'data' => $data, ); } WC()->session->set( 'wc_notices', $notices ); } /** * Set all notices at once. * * @since 2.6.0 * @param array[] $notices Array of notices. */ function wc_set_notices( $notices ) { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.6' ); return; } WC()->session->set( 'wc_notices', $notices ); } /** * Unset all notices. * * @since 2.1 */ function wc_clear_notices() { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' ); return; } WC()->session->set( 'wc_notices', null ); } /** * Prints messages and errors which are stored in the session, then clears them. * * @since 2.1 * @param bool $return true to return rather than echo. @since 3.5.0. * @return string|void */ function wc_print_notices( $return = false ) { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' ); return; } $session = WC()->session; // If the session handler has not initialized, there will be no notices for us to read. if ( null === $session ) { return; } $all_notices = $session->get( 'wc_notices', array() ); $notice_types = apply_filters( 'woocommerce_notice_types', array( 'error', 'success', 'notice' ) ); // Buffer output. ob_start(); foreach ( $notice_types as $notice_type ) { if ( wc_notice_count( $notice_type ) > 0 ) { $messages = array(); foreach ( $all_notices[ $notice_type ] as $notice ) { $messages[] = isset( $notice['notice'] ) ? $notice['notice'] : $notice; } wc_get_template( "notices/{$notice_type}.php", array( 'messages' => array_filter( $messages ), // @deprecated 3.9.0 'notices' => array_filter( $all_notices[ $notice_type ] ), ) ); } } wc_clear_notices(); $notices = wc_kses_notice( ob_get_clean() ); if ( $return ) { return $notices; } echo $notices; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Print a single notice immediately. * * @since 2.1 * @version 3.9.0 * @param string $message The text to display in the notice. * @param string $notice_type Optional. The singular name of the notice type - either error, success or notice. * @param array $data Optional notice data. @since 3.9.0. * @param bool $return true to return rather than echo. @since 7.7.0. */ function wc_print_notice( $message, $notice_type = 'success', $data = array(), $return = false ) { if ( 'success' === $notice_type ) { $message = apply_filters( 'woocommerce_add_message', $message ); } $message = apply_filters( 'woocommerce_add_' . $notice_type, $message ); // Buffer output. ob_start(); wc_get_template( "notices/{$notice_type}.php", array( 'messages' => array( $message ), // @deprecated 3.9.0 'notices' => array( array( 'notice' => $message, 'data' => $data, ), ), ) ); $notice = wc_kses_notice( ob_get_clean() ); if ( $return ) { return $notice; } echo $notice; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } /** * Returns all queued notices, optionally filtered by a notice type. * * @since 2.1 * @version 3.9.0 * @param string $notice_type Optional. The singular name of the notice type - either error, success or notice. * @return array[] */ function wc_get_notices( $notice_type = '' ) { if ( ! did_action( 'woocommerce_init' ) ) { wc_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before woocommerce_init.', 'woocommerce' ), '2.3' ); return; } $all_notices = WC()->session->get( 'wc_notices', array() ); if ( empty( $notice_type ) ) { $notices = $all_notices; } elseif ( isset( $all_notices[ $notice_type ] ) ) { $notices = $all_notices[ $notice_type ]; } else { $notices = array(); } return $notices; } /** * Add notices for WP Errors. * * @param WP_Error $errors Errors. */ function wc_add_wp_error_notices( $errors ) { if ( is_wp_error( $errors ) && $errors->get_error_messages() ) { foreach ( $errors->get_error_messages() as $error ) { wc_add_notice( $error, 'error' ); } } } /** * Filters out the same tags as wp_kses_post, but allows tabindex for element. * * @since 3.5.0 * @param string $message Content to filter through kses. * @return string */ function wc_kses_notice( $message ) { $allowed_tags = array_replace_recursive( wp_kses_allowed_html( 'post' ), array( 'a' => array( 'tabindex' => true, ), ) ); /** * Kses notice allowed tags. * * @since 3.9.0 * @param array[]|string $allowed_tags An array of allowed HTML elements and attributes, or a context name such as 'post'. */ return wp_kses( $message, apply_filters( 'woocommerce_kses_notice_allowed_tags', $allowed_tags ) ); } /** * Get notice data attribute. * * @since 3.9.0 * @param array $notice Notice data. * @return string */ function wc_get_notice_data_attr( $notice ) { if ( empty( $notice['data'] ) ) { return; } $attr = ''; foreach ( $notice['data'] as $key => $value ) { $attr .= sprintf( ' data-%1$s="%2$s"', sanitize_title( $key ), esc_attr( $value ) ); } return $attr; }