Improve choice of words
This commit is contained in:
parent
2b6d9a1074
commit
5240682f38
|
@ -872,7 +872,7 @@
|
||||||
* Tweak - Remove the left and right margin from the logo in emails. #23360
|
* Tweak - Remove the left and right margin from the logo in emails. #23360
|
||||||
* Tweak - Use the high res version of the WP spinner in the coupon Block UI. #23364
|
* Tweak - Use the high res version of the WP spinner in the coupon Block UI. #23364
|
||||||
* Tweak - Improve user registration validation messages. #23468
|
* Tweak - Improve user registration validation messages. #23468
|
||||||
* Tweak - Auto generate a new username when a username is blacklisted by WordPress. #23672
|
* Tweak - Auto generate a new username when a username is blocked by WordPress. #23672
|
||||||
* Tweak - Guest cart sessions now gets deleted when a user logs in, preventing duplicate cart sessions. #23687
|
* Tweak - Guest cart sessions now gets deleted when a user logs in, preventing duplicate cart sessions. #23687
|
||||||
* Tweak - Include the store's base postcode and city when calculating order taxes. #23695
|
* Tweak - Include the store's base postcode and city when calculating order taxes. #23695
|
||||||
* Tweak - Update the generate username setting description label to reflect how the username is actually generated. #23911
|
* Tweak - Update the generate username setting description label to reflect how the username is actually generated. #23911
|
||||||
|
@ -3968,7 +3968,7 @@
|
||||||
* Fix - Fix bulk editing variation sale price.
|
* Fix - Fix bulk editing variation sale price.
|
||||||
* Fix - Remove comment exclusion in order notes meta box.
|
* Fix - Remove comment exclusion in order notes meta box.
|
||||||
* Fix - Sync min and max prices for regular and sale prices so prices are displayed correctly when sale price is lower than a regular price of another variation.
|
* Fix - Sync min and max prices for regular and sale prices so prices are displayed correctly when sale price is lower than a regular price of another variation.
|
||||||
* Fix - Expanding line item_meta causes conflicts if attributes are named with things like 'name', 'type' or 'qty'. Added blacklist to exclude unsafe values.
|
* Fix - Expanding line item_meta causes conflicts if attributes are named with things like 'name', 'type' or 'qty'. Added blocklist to exclude unsafe values.
|
||||||
* Fix - Added support for clearing report transients when using object caching.
|
* Fix - Added support for clearing report transients when using object caching.
|
||||||
* Fix - encoding issues with attribute values.
|
* Fix - encoding issues with attribute values.
|
||||||
* Fix - Escape the contents of the changelog when displayed.
|
* Fix - Escape the contents of the changelog when displayed.
|
||||||
|
|
|
@ -137,7 +137,7 @@ class WC_Admin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||||
// Nonced plugin install redirects (whitelisted).
|
// Nonced plugin install redirects.
|
||||||
if ( ! empty( $_GET['wc-install-plugin-redirect'] ) ) {
|
if ( ! empty( $_GET['wc-install-plugin-redirect'] ) ) {
|
||||||
$plugin_slug = wc_clean( wp_unslash( $_GET['wc-install-plugin-redirect'] ) );
|
$plugin_slug = wc_clean( wp_unslash( $_GET['wc-install-plugin-redirect'] ) );
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ class WC_Meta_Box_Coupon_Data {
|
||||||
'id' => 'customer_email',
|
'id' => 'customer_email',
|
||||||
'label' => __( 'Allowed emails', 'woocommerce' ),
|
'label' => __( 'Allowed emails', 'woocommerce' ),
|
||||||
'placeholder' => __( 'No restrictions', 'woocommerce' ),
|
'placeholder' => __( 'No restrictions', 'woocommerce' ),
|
||||||
'description' => __( 'Whitelist of billing emails to check against when an order is placed. Separate email addresses with commas. You can also use an asterisk (*) to match parts of an email. For example "*@gmail.com" would match all gmail addresses.', 'woocommerce' ),
|
'description' => __( 'List of allowed billing emails to check against when an order is placed. Separate email addresses with commas. You can also use an asterisk (*) to match parts of an email. For example "*@gmail.com" would match all gmail addresses.', 'woocommerce' ),
|
||||||
'value' => implode( ', ', (array) $coupon->get_email_restrictions( 'edit' ) ),
|
'value' => implode( ', ', (array) $coupon->get_email_restrictions( 'edit' ) ),
|
||||||
'desc_tip' => true,
|
'desc_tip' => true,
|
||||||
'type' => 'email',
|
'type' => 'email',
|
||||||
|
|
|
@ -203,7 +203,7 @@ class WC_Regenerate_Images {
|
||||||
return $image;
|
return $image;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use a whitelist of sizes we want to resize. Ignore others.
|
// List of sizes we want to resize. Ignore others.
|
||||||
if ( ! $image || ! in_array( $size, apply_filters( 'woocommerce_image_sizes_to_resize', array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single', 'shop_thumbnail', 'shop_catalog', 'shop_single' ) ), true ) ) {
|
if ( ! $image || ! in_array( $size, apply_filters( 'woocommerce_image_sizes_to_resize', array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single', 'shop_thumbnail', 'shop_catalog', 'shop_single' ) ), true ) ) {
|
||||||
return $image;
|
return $image;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ class WC_Tracks_Event {
|
||||||
|
|
||||||
$_event = (object) array_merge( (array) $event, $validated );
|
$_event = (object) array_merge( (array) $event, $validated );
|
||||||
|
|
||||||
// If you want to blacklist property names, do it here.
|
// If you want to block property names, do it here.
|
||||||
// Make sure we have an event timestamp.
|
// Make sure we have an event timestamp.
|
||||||
if ( ! isset( $_event->_ts ) ) {
|
if ( ! isset( $_event->_ts ) ) {
|
||||||
$_event->_ts = WC_Tracks_Client::build_timestamp();
|
$_event->_ts = WC_Tracks_Client::build_timestamp();
|
||||||
|
@ -150,13 +150,13 @@ class WC_Tracks_Event {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$whitelisted_key_names = array(
|
$allowed_key_names = array(
|
||||||
'anonId',
|
'anonId',
|
||||||
'Browser_Type',
|
'Browser_Type',
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ( array_keys( (array) $event ) as $key ) {
|
foreach ( array_keys( (array) $event ) as $key ) {
|
||||||
if ( in_array( $key, $whitelisted_key_names, true ) ) {
|
if ( in_array( $key, $allowed_key_names, true ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( ! self::prop_name_is_valid( $key ) ) {
|
if ( ! self::prop_name_is_valid( $key ) ) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ class WC_Admin_Setup_Wizard_Tracking {
|
||||||
add_action( 'shutdown', array( $this, 'track_skip_step' ), 1 );
|
add_action( 'shutdown', array( $this, 'track_skip_step' ), 1 );
|
||||||
add_action( 'add_option_woocommerce_allow_tracking', array( $this, 'track_start' ), 10, 2 );
|
add_action( 'add_option_woocommerce_allow_tracking', array( $this, 'track_start' ), 10, 2 );
|
||||||
add_action( 'admin_init', array( $this, 'track_ready_next_steps' ), 1 );
|
add_action( 'admin_init', array( $this, 'track_ready_next_steps' ), 1 );
|
||||||
add_action( 'wp_print_scripts', array( $this, 'dequeue_non_whitelisted_scripts' ) );
|
add_action( 'wp_print_scripts', array( $this, 'dequeue_non_allowed_scripts' ) );
|
||||||
$this->add_step_save_events();
|
$this->add_step_save_events();
|
||||||
add_action( 'woocommerce_setup_footer', array( $this, 'add_footer_scripts' ) );
|
add_action( 'woocommerce_setup_footer', array( $this, 'add_footer_scripts' ) );
|
||||||
}
|
}
|
||||||
|
@ -56,12 +56,12 @@ class WC_Admin_Setup_Wizard_Tracking {
|
||||||
/**
|
/**
|
||||||
* Dequeue unwanted scripts from OBW footer.
|
* Dequeue unwanted scripts from OBW footer.
|
||||||
*/
|
*/
|
||||||
public function dequeue_non_whitelisted_scripts() {
|
public function dequeue_non_allowed_scripts() {
|
||||||
global $wp_scripts;
|
global $wp_scripts;
|
||||||
$whitelist = array( 'woo-tracks' );
|
$allowed = array( 'woo-tracks' );
|
||||||
|
|
||||||
foreach ( $wp_scripts->queue as $script ) {
|
foreach ( $wp_scripts->queue as $script ) {
|
||||||
if ( in_array( $script, $whitelist, true ) ) {
|
if ( in_array( $script, $allowed, true ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
wp_dequeue_script( $script );
|
wp_dequeue_script( $script );
|
||||||
|
|
|
@ -11,12 +11,13 @@ defined( 'ABSPATH' ) || exit;
|
||||||
* This class adds actions to track usage of WooCommerce Settings.
|
* This class adds actions to track usage of WooCommerce Settings.
|
||||||
*/
|
*/
|
||||||
class WC_Settings_Tracking {
|
class WC_Settings_Tracking {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whitelisted WooCommerce settings to potentially track updates for.
|
* List of allowed WooCommerce settings to potentially track updates for.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $whitelist = array();
|
protected $allowed_options = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WooCommerce settings that have been updated (and will be tracked).
|
* WooCommerce settings that have been updated (and will be tracked).
|
||||||
|
@ -30,22 +31,22 @@ class WC_Settings_Tracking {
|
||||||
*/
|
*/
|
||||||
public function init() {
|
public function init() {
|
||||||
add_action( 'woocommerce_settings_page_init', array( $this, 'track_settings_page_view' ) );
|
add_action( 'woocommerce_settings_page_init', array( $this, 'track_settings_page_view' ) );
|
||||||
add_action( 'woocommerce_update_option', array( $this, 'add_option_to_whitelist' ) );
|
add_action( 'woocommerce_update_option', array( $this, 'add_option_to_list' ) );
|
||||||
add_action( 'woocommerce_update_options', array( $this, 'send_settings_change_event' ) );
|
add_action( 'woocommerce_update_options', array( $this, 'send_settings_change_event' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a WooCommerce option name to our whitelist and attach
|
* Add a WooCommerce option name to our allowed options list and attach
|
||||||
* the `update_option` hook. Rather than inspecting every updated
|
* the `update_option` hook. Rather than inspecting every updated
|
||||||
* option and pattern matching for "woocommerce", just build a dynamic
|
* option and pattern matching for "woocommerce", just build a dynamic
|
||||||
* whitelist for WooCommerce options that might get updated.
|
* list for WooCommerce options that might get updated.
|
||||||
*
|
*
|
||||||
* See `woocommerce_update_option` hook.
|
* See `woocommerce_update_option` hook.
|
||||||
*
|
*
|
||||||
* @param array $option WooCommerce option (config) that might get updated.
|
* @param array $option WooCommerce option (config) that might get updated.
|
||||||
*/
|
*/
|
||||||
public function add_option_to_whitelist( $option ) {
|
public function add_option_to_list( $option ) {
|
||||||
$this->whitelist[] = $option['id'];
|
$this->allowed_options[] = $option['id'];
|
||||||
|
|
||||||
// Delay attaching this action since it could get fired a lot.
|
// Delay attaching this action since it could get fired a lot.
|
||||||
if ( false === has_action( 'update_option', array( $this, 'track_setting_change' ) ) ) {
|
if ( false === has_action( 'update_option', array( $this, 'track_setting_change' ) ) ) {
|
||||||
|
@ -62,7 +63,7 @@ class WC_Settings_Tracking {
|
||||||
*/
|
*/
|
||||||
public function track_setting_change( $option_name, $old_value, $new_value ) {
|
public function track_setting_change( $option_name, $old_value, $new_value ) {
|
||||||
// Make sure this is a WooCommerce option.
|
// Make sure this is a WooCommerce option.
|
||||||
if ( ! in_array( $option_name, $this->whitelist, true ) ) {
|
if ( ! in_array( $option_name, $this->allowed_options, true ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1918,8 +1918,8 @@ add_action( 'woocommerce_cleanup_logs', 'wc_cleanup_logs' );
|
||||||
/**
|
/**
|
||||||
* Prints human-readable information about a variable.
|
* Prints human-readable information about a variable.
|
||||||
*
|
*
|
||||||
* Some server environments blacklist some debugging functions. This function provides a safe way to
|
* Some server environments block some debugging functions. This function provides a safe way to
|
||||||
* turn an expression into a printable, readable form without calling blacklisted functions.
|
* turn an expression into a printable, readable form without calling blocked functions.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -162,10 +162,10 @@ function wc_create_new_customer_username( $email, $new_user_args = array(), $suf
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WordPress 4.4 - filters the list of blacklisted usernames.
|
* WordPress 4.4 - filters the list of blocked usernames.
|
||||||
*
|
*
|
||||||
* @since 3.7.0
|
* @since 3.7.0
|
||||||
* @param array $usernames Array of blacklisted usernames.
|
* @param array $usernames Array of blocked usernames.
|
||||||
*/
|
*/
|
||||||
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
|
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
|
||||||
|
|
||||||
|
|
|
@ -130,16 +130,16 @@ class FeatureContext extends BehatContext implements ClosuredContextInterface {
|
||||||
private static function terminate_proc( $proc ) {
|
private static function terminate_proc( $proc ) {
|
||||||
$status = proc_get_status( $proc );
|
$status = proc_get_status( $proc );
|
||||||
|
|
||||||
$master_pid = $status['pid'];
|
$pid = $status['pid'];
|
||||||
|
|
||||||
$output = `ps -o ppid,pid,command | grep $master_pid`;
|
$output = `ps -o ppid,pid,command | grep $pid`;
|
||||||
|
|
||||||
foreach ( explode( PHP_EOL, $output ) as $line ) {
|
foreach ( explode( PHP_EOL, $output ) as $line ) {
|
||||||
if ( preg_match( '/^\s*(\d+)\s+(\d+)/', $line, $matches ) ) {
|
if ( preg_match( '/^\s*(\d+)\s+(\d+)/', $line, $matches ) ) {
|
||||||
$parent = $matches[1];
|
$parent = $matches[1];
|
||||||
$child = $matches[2];
|
$child = $matches[2];
|
||||||
|
|
||||||
if ( $parent == $master_pid ) {
|
if ( $parent == $pid ) {
|
||||||
if ( ! posix_kill( (int) $child, 9 ) ) {
|
if ( ! posix_kill( (int) $child, 9 ) ) {
|
||||||
throw new RuntimeException( posix_strerror( posix_get_last_error() ) );
|
throw new RuntimeException( posix_strerror( posix_get_last_error() ) );
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ class FeatureContext extends BehatContext implements ClosuredContextInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! posix_kill( (int) $master_pid, 9 ) ) {
|
if ( ! posix_kill( (int) $pid, 9 ) ) {
|
||||||
throw new RuntimeException( posix_strerror( posix_get_last_error() ) );
|
throw new RuntimeException( posix_strerror( posix_get_last_error() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case {
|
||||||
/**
|
/**
|
||||||
* Set illegal login
|
* Set illegal login
|
||||||
*
|
*
|
||||||
* @param array $logins Array of blacklisted logins.
|
* @param array $logins Array of blocked logins.
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function setup_illegal_user_logins( $logins ) {
|
public function setup_illegal_user_logins( $logins ) {
|
||||||
|
|
|
@ -405,7 +405,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case {
|
||||||
);
|
);
|
||||||
|
|
||||||
// This filter will sequentially remove handlers, allowing us to test as though our
|
// This filter will sequentially remove handlers, allowing us to test as though our
|
||||||
// functions were accumulatively blacklisted, adding one on each call.
|
// functions were accumulatively blocked, adding one on each call.
|
||||||
add_filter( 'woocommerce_print_r_alternatives', array( $this, 'filter_wc_print_r_alternatives' ) );
|
add_filter( 'woocommerce_print_r_alternatives', array( $this, 'filter_wc_print_r_alternatives' ) );
|
||||||
|
|
||||||
$this->expectOutputString(
|
$this->expectOutputString(
|
||||||
|
|
Loading…
Reference in New Issue