Fix WPCS violations automatically using phpcbf
This commit is contained in:
parent
dca1f3d4d7
commit
5e6ae9bfb6
|
@ -47,7 +47,7 @@ class WC_Beta_Tester_Admin_Assets {
|
|||
'wc-beta-tester-version-picker',
|
||||
'wc_beta_tester_version_picker_params',
|
||||
array(
|
||||
'i18n_pick_version' => __( 'Please pick a WooCommerce version.', 'woocommerce-beta-tester' ),
|
||||
'i18n_pick_version' => __( 'Please pick a WooCommerce version.', 'woocommerce-beta-tester' ),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ Copy and paste the system status report from **WooCommerce > System Status** in
|
|||
$ssr = get_transient( $transient_name );
|
||||
|
||||
if ( false === $ssr ) {
|
||||
if( ! did_action( 'rest_api_init' ) ) {
|
||||
if ( ! did_action( 'rest_api_init' ) ) {
|
||||
WC()->api->rest_api_includes();
|
||||
}
|
||||
|
||||
|
@ -255,11 +255,13 @@ Copy and paste the system status report from **WooCommerce > System Status** in
|
|||
}
|
||||
|
||||
// Add the beta tester root node.
|
||||
$wp_admin_bar->add_node( array(
|
||||
'parent' => 0,
|
||||
'id' => 'wc-beta-tester',
|
||||
'title' => __( 'WC Beta Tester', 'woocommerce-beta-tester' ),
|
||||
) );
|
||||
$wp_admin_bar->add_node(
|
||||
array(
|
||||
'parent' => 0,
|
||||
'id' => 'wc-beta-tester',
|
||||
'title' => __( 'WC Beta Tester', 'woocommerce-beta-tester' ),
|
||||
)
|
||||
);
|
||||
|
||||
$settings = WC_Beta_Tester::get_settings();
|
||||
switch ( $settings->channel ) {
|
||||
|
|
|
@ -43,17 +43,19 @@ class WC_Beta_Tester_Plugin_Upgrader extends Plugin_Upgrader {
|
|||
add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 );
|
||||
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );
|
||||
|
||||
$this->run( array(
|
||||
'package' => $download_url,
|
||||
'destination' => WP_PLUGIN_DIR,
|
||||
'clear_destination' => true,
|
||||
'clear_working' => true,
|
||||
'hook_extra' => array(
|
||||
'plugin' => $plugin,
|
||||
'type' => 'plugin',
|
||||
'action' => 'update',
|
||||
),
|
||||
) );
|
||||
$this->run(
|
||||
array(
|
||||
'package' => $download_url,
|
||||
'destination' => WP_PLUGIN_DIR,
|
||||
'clear_destination' => true,
|
||||
'clear_working' => true,
|
||||
'hook_extra' => array(
|
||||
'plugin' => $plugin,
|
||||
'type' => 'plugin',
|
||||
'action' => 'update',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
// Cleanup our hooks, in case something else does a upgrade on this connection.
|
||||
remove_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ) );
|
||||
|
|
|
@ -75,11 +75,11 @@ class WC_Beta_Tester_Settings {
|
|||
public function version_select_html( $args ) {
|
||||
$settings = WC_Beta_Tester::get_settings();
|
||||
$channels = array(
|
||||
'beta' => array(
|
||||
'beta' => array(
|
||||
'name' => __( 'Beta Releases', 'woocommerce-beta-tester' ),
|
||||
'description' => __( 'Beta releases contain experimental functionality for testing purposes only. This channel will also include RC and stable releases if more current.', 'woocommerce-beta-tester' ),
|
||||
),
|
||||
'rc' => array(
|
||||
'rc' => array(
|
||||
'name' => __( 'Release Candidates', 'woocommerce-beta-tester' ),
|
||||
'description' => __( 'Release candidates are released to ensure any critical problems have not gone undetected. This channel will also include stable releases if more current.', 'woocommerce-beta-tester' ),
|
||||
),
|
||||
|
|
|
@ -102,7 +102,8 @@ class WC_Beta_Tester_Version_Picker {
|
|||
* @return void
|
||||
*/
|
||||
public function add_to_menus() {
|
||||
add_submenu_page( 'plugins.php',
|
||||
add_submenu_page(
|
||||
'plugins.php',
|
||||
__( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ),
|
||||
__( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ),
|
||||
'install_plugins',
|
||||
|
|
Loading…
Reference in New Issue