Replace “Cheatin’ uh?” with friendlier messages
This commit is contained in:
parent
d6262e0b0e
commit
c21cc2e8fe
|
@ -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'] );
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue