Fix WPCS violations automatically using phpcbf

This commit is contained in:
Rodrigo Primo 2019-03-13 16:54:47 -03:00
parent dca1f3d4d7
commit 5e6ae9bfb6
5 changed files with 26 additions and 21 deletions

View File

@ -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(
$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 ) {

View File

@ -43,7 +43,8 @@ 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(
$this->run(
array(
'package' => $download_url,
'destination' => WP_PLUGIN_DIR,
'clear_destination' => true,
@ -53,7 +54,8 @@ class WC_Beta_Tester_Plugin_Upgrader extends Plugin_Upgrader {
'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' ) );

View File

@ -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',