Replace “Cheatin’ uh?” with friendlier messages

This commit is contained in:
Caleb Burks 2018-02-07 17:01:12 -05:00
parent d6262e0b0e
commit c21cc2e8fe
7 changed files with 12 additions and 12 deletions

View File

@ -124,7 +124,7 @@ class WC_Admin_Notices {
}
if ( ! current_user_can( 'manage_woocommerce' ) ) {
wp_die( __( 'Cheatin’ huh?', 'woocommerce' ) );
wp_die( __( 'You don’t have permission to do this.', 'woocommerce' ) );
}
$hide_notice = sanitize_text_field( $_GET['wc-hide-notice'] );

View File

@ -153,14 +153,14 @@ class WC_Checkout {
* Cloning is forbidden.
*/
public function __clone() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'woocommerce' ), '2.1' );
}
/**
* Unserializing instances of this class is forbidden.
*/
public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '2.1' );
}
/**

View File

@ -50,7 +50,7 @@ class WC_Emails {
* @since 2.1
*/
public function __clone() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'woocommerce' ), '2.1' );
}
/**
@ -59,7 +59,7 @@ class WC_Emails {
* @since 2.1
*/
public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '2.1' );
}
/**

View File

@ -48,7 +48,7 @@ class WC_Payment_Gateways {
* @since 2.1
*/
public function __clone() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'woocommerce' ), '2.1' );
}
/**
@ -57,7 +57,7 @@ class WC_Payment_Gateways {
* @since 2.1
*/
public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '2.1' );
}
/**

View File

@ -60,7 +60,7 @@ class WC_Shipping {
* @since 2.1
*/
public function __clone() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'woocommerce' ), '2.1' );
}
/**
@ -69,7 +69,7 @@ class WC_Shipping {
* @since 2.1
*/
public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '2.1' );
}
/**

View File

@ -123,7 +123,7 @@ final class WooCommerce {
* @since 2.1
*/
public function __clone() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Cloning is forbidden.', 'woocommerce' ), '2.1' );
}
/**
@ -132,7 +132,7 @@ final class WooCommerce {
* @since 2.1
*/
public function __wakeup() {
wc_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'woocommerce' ), '2.1' );
wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '2.1' );
}
/**

View File

@ -771,7 +771,7 @@ class WC_Email extends WC_Settings_API {
}
if ( ! current_user_can( 'edit_themes' ) ) {
wp_die( __( 'Cheatin’ huh?', 'woocommerce' ) );
wp_die( __( 'You don’t have permission to do this.', 'woocommerce' ) );
}
if ( ! empty( $_GET['move_template'] ) ) {