• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / EDD_Notices::show_notices() – Show relevant notices

You appear to be a bot. Output may be restricted

Description

Show relevant notices

Usage

EDD_Notices::show_notices();

Parameters

Returns

void

Source

File name: easy-digital-downloads/includes/admin/class-edd-notices.php
Lines:

101 to 200 of 277
      echo wp_kses_post(
        sprintf(
          /* translators:
					%1$s Opening paragraph tag, do not translate.
					%2$s Opening anchor tag, do not translate.
					%3$s Closing anchor tag, do not translate.
					%4$s Closing paragraph tag, do not translate.
					*/
          __( '%1$sMany web hosts can give you instructions on how/where to upgrade your version of PHP through their control panel, or may even be able to do it for you. If you need to change hosts, please see %2$sour hosting recommendations%3$s.', 'easy-digital-downloads' ),
          '<p>',
          '<a href="https://easydigitaldownloads.com/recommended-wordpress-hosting/" target="_blank" rel="noopener noreferrer">',
          '</a>',
          '</p>'
        )
      );
      echo wp_kses_post(
        sprintf(
          /* Translators: %1$s - Opening anchor tag, %2$s - The url to dismiss the ajax notice, %3$s - Complete the opening of the anchor tag, %4$s - Open span tag, %4$s - Close span tag */
          __( '%1$s%2$s%3$s %4$s Dismiss this notice. %5$s', 'easy-digital-downloads' ),
          '<a href="',
          esc_url(
            add_query_arg(
              array(
                'edd_action' => 'dismiss_notices',
                'edd_notice' => 'upgrade_php_56',
              )
            )
          ),
          '" type="button" class="notice-dismiss">',
          '<span class="screen-reader-text">',
          '</span>
					</a>'
        )
      );
      echo '</div>';
    }

    $this->show_debugging_notice();

    /* Commented out per https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/3475
		if( ! edd_test_ajax_works() && ! get_user_meta( get_current_user_id(), '_edd_admin_ajax_inaccessible_dismissed', true ) && current_user_can( 'manage_shop_settings' ) ) {
			echo '<div class="error">';
				echo '<p>' . __( 'Your site appears to be blocking the WordPress ajax interface. This may causes issues with your store.', 'easy-digital-downloads' ) . '</p>';
				echo '<p>' . sprintf( __( 'Please see <a href="%s" target="_blank">this reference</a> for possible solutions.', 'easy-digital-downloads' ), 'https://easydigitaldownloads.com/docs/admin-ajax-blocked' ) . '</p>';
				echo '<p><a href="' . add_query_arg( array( 'edd_action' => 'dismiss_notices', 'edd_notice' => 'admin_ajax_inaccessible' ) ) . '">' . __( 'Dismiss Notice', 'easy-digital-downloads' ) . '</a></p>';
			echo '</div>';
		}
		*/

    if ( isset( $_GET['edd-message'] ) ) {
      // Shop discounts errors
      if( current_user_can( 'manage_shop_discounts' ) ) {
        switch( $_GET['edd-message'] ) {
          case 'discount_added' :
            $notices['updated']['edd-discount-added'] = __( 'Discount code added.', 'easy-digital-downloads' );
            break;
          case 'discount_add_failed' :
            $notices['error']['edd-discount-add-fail'] = __( 'There was a problem adding your discount code, please try again.', 'easy-digital-downloads' );
            break;
          case 'discount_exists' :
            $notices['error']['edd-discount-exists'] = __( 'A discount with that code already exists, please use a different code.', 'easy-digital-downloads' );
            break;
          case 'discount_updated' :
            $notices['updated']['edd-discount-updated'] = __( 'Discount code updated.', 'easy-digital-downloads' );
            break;
          case 'discount_update_failed' :
            $notices['error']['edd-discount-updated-fail'] = __( 'There was a problem updating your discount code, please try again.', 'easy-digital-downloads' );
            break;
          case 'discount_validation_failed' :
            $notices['error']['edd-discount-validation-fail'] = __( 'The discount code could not be added because one or more of the required fields was empty, please try again.', 'easy-digital-downloads' );
            break;
          case 'discount_invalid_code':
            $notices['error']['edd-discount-invalid-code'] = __( 'The discount code entered is invalid; only alphanumeric characters are allowed, please try again.', 'easy-digital-downloads' );
            break;
          case 'discount_invalid_amount' :
            $notices['error']['edd-discount-invalid-amount'] = __( 'The discount amount must be a valid percentage or numeric flat amount. Please try again.', 'easy-digital-downloads' );
            break;
        }
      }

      // Shop reports errors
      if( current_user_can( 'view_shop_reports' ) ) {
        switch( $_GET['edd-message'] ) {
          case 'payment_deleted' :
            $notices['updated']['edd-payment-deleted'] = __( 'The payment has been deleted.', 'easy-digital-downloads' );
            break;
          case 'email_sent' :
            $notices['updated']['edd-payment-sent'] = __( 'The purchase receipt has been resent.', 'easy-digital-downloads' );
            break;
          case 'email_send_failed':
            $notices['error']['edd-payment-sent'] = __( 'Failed to send purchase receipt.', 'easy-digital-downloads' );
            break;
          case 'refreshed-reports' :
            $notices['updated']['edd-refreshed-reports'] = __( 'The reports have been refreshed.', 'easy-digital-downloads' );
            break;
          case 'payment-note-deleted' :
            $notices['updated']['edd-payment-note-deleted'] = __( 'The payment note has been deleted.', 'easy-digital-downloads' );
            break;
        }
      }
 
« Previous [1] [2] [3] Next »

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 26th January 2022

Primary Sidebar

Information

Function name: EDD_Notices::show_notices
Class ref: EDD_Notices
Plugin ref: Easy Digital Downloads
Version: 2.11.6
Sourcefile: includes/admin/class-edd-notices.php
File ref: includes/admin/class-edd-notices.php
Deprecated?: No
API Letters: E,N,S

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites