Skip to content

Commit

Permalink
👌 IMPROVE: WordPress Coding Standards updates
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdevore committed Nov 23, 2020
1 parent 3b5e703 commit 9f7ab5e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions admin/class-ddwc-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ function ddwc_custom_delivery_driver_column( $column ) {
* @since 2.1
*/
function ddwc_add_no_link_to_woocommerce_orders( $classes ) {
if ( current_user_can( 'manage_woocommerce' ) ) { //make sure we are shop managers
foreach ( $classes as $class ) {
if ( $class == 'type-shop_order' ) {
$classes[] = 'no-link';
}
}
}
return $classes;
if ( current_user_can( 'manage_woocommerce' ) ) {
foreach ( $classes as $class ) {
if ( 'type-shop_order' == $class ) {
$classes[] = 'no-link';
}
}
}
return $classes;
}
add_filter( 'post_class', 'ddwc_add_no_link_to_woocommerce_orders' );

Expand Down

0 comments on commit 9f7ab5e

Please sign in to comment.