Fixed coding standards

This commit is contained in:
Claudio Sanches 2019-02-20 16:30:46 -03:00
parent 5302434057
commit 79847ccb93
2 changed files with 9 additions and 7 deletions

View File

@ -384,9 +384,7 @@ add_filter( 'user_has_cap', 'wc_customer_has_capability', 10, 3 );
function wc_shop_manager_has_capability( $allcaps, $caps, $args, $user ) { function wc_shop_manager_has_capability( $allcaps, $caps, $args, $user ) {
if ( wc_user_has_role( $user, 'shop_manager' ) ) { if ( wc_user_has_role( $user, 'shop_manager' ) ) {
/** // @see wc_modify_map_meta_cap, which limits editing to customers.
* @see wc_modify_map_meta_cap, which limits editing to customers.
*/
$allcaps['edit_users'] = true; $allcaps['edit_users'] = true;
} }

View File

@ -1,8 +1,12 @@
<?php <?php
/**
* Customer functions
*
* @package WooCommerce\Tests\Customer
*/
/** /**
* Customer functions. * WC_Tests_Customer_Functions class.
* @package WooCommerce\Tests\Customer
*/ */
class WC_Tests_Customer_Functions extends WC_Unit_Test_Case { class WC_Tests_Customer_Functions extends WC_Unit_Test_Case {
@ -52,7 +56,7 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case {
'testpassword', 'testpassword',
array( array(
'first_name' => 'John', 'first_name' => 'John',
'last_name' => 'Doe' 'last_name' => 'Doe',
) )
); );
$userdata = get_userdata( $id ); $userdata = get_userdata( $id );
@ -83,7 +87,7 @@ class WC_Tests_Customer_Functions extends WC_Unit_Test_Case {
$order2 = new WC_Order(); $order2 = new WC_Order();
$order2->save(); $order2->save();
// Test download permissions // Test download permissions.
$prod_download = new WC_Product_Download(); $prod_download = new WC_Product_Download();
$prod_download->set_file( plugin_dir_url( __FILE__ ) . '/assets/images/help.png' ); $prod_download->set_file( plugin_dir_url( __FILE__ ) . '/assets/images/help.png' );
$prod_download->set_id( 'download' ); $prod_download->set_id( 'download' );