Skip to content

Commit

Permalink
Minor PHPCS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeatorres committed May 12, 2023
1 parent 99b5c7e commit 1b04c2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -1941,10 +1941,10 @@ public function add_to_cart_aria_describedby() {
/**
* Filter the aria-describedby description for the add to cart button.
*
* @since x.x.x
* @since 7.8.0
*
* @param string $var aria-describedby description.
* @param WC_Product $this object.
* @param string $var Text for the 'aria-describedby' attribute.
* @param WC_Product $this Product object.
*/
return apply_filters( 'woocommerce_product_add_to_cart_aria_describedby', '', $this );

Check warning on line 1949 in plugins/woocommerce/includes/abstracts/abstract-wc-product.php

View check run for this annotation

Codecov / codecov/patch

plugins/woocommerce/includes/abstracts/abstract-wc-product.php#L1949

Added line #L1949 was not covered by tests
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/woocommerce/includes/class-wc-product-variable.php
Expand Up @@ -57,6 +57,11 @@ public function get_type() {
* @return string
*/
public function add_to_cart_aria_describedby() {

Check warning on line 59 in plugins/woocommerce/includes/class-wc-product-variable.php

View check run for this annotation

Codecov / codecov/patch

plugins/woocommerce/includes/class-wc-product-variable.php#L59

Added line #L59 was not covered by tests
/**
* This filter is documented in includes/abstracts/abstract-wc-product.php.
*
* @since 7.8.0
*/
return apply_filters( 'woocommerce_product_add_to_cart_aria_describedby', $this->is_purchasable() ? __( 'This product has multiple variants. The options may be chosen on the product page', 'woocommerce' ) : '', $this );

Check warning on line 65 in plugins/woocommerce/includes/class-wc-product-variable.php

View check run for this annotation

Codecov / codecov/patch

plugins/woocommerce/includes/class-wc-product-variable.php#L65

Added line #L65 was not covered by tests
}

Expand Down

0 comments on commit 1b04c2f

Please sign in to comment.