Merge pull request #27987 from woocommerce/php8/fix-required-parameters-after-optional-take-2

[PHP 8] Convert optional-before-required parameters into required parameters (take 2)
This commit is contained in:
Rodrigo Primo 2020-10-17 09:42:20 -03:00 committed by GitHub
commit 0a81188e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -387,7 +387,7 @@ class WC_Admin_Taxonomies {
* @param object $term Term object.
* @return array
*/
public function product_cat_row_actions( $actions = array(), $term ) {
public function product_cat_row_actions( $actions, $term ) {
$default_category_id = absint( get_option( 'default_product_cat', 0 ) );
if ( $default_category_id !== $term->term_id && current_user_can( 'edit_term', $term->term_id ) ) {

View File

@ -93,7 +93,7 @@ class WC_Product_Cat_Dropdown_Walker extends Walker {
* @param string $output Passed by reference. Used to append additional content.
* @return null Null on failure with no changes to parameters.
*/
public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
if ( ! $element || ( 0 === $element->count && ! empty( $args[0]['hide_empty'] ) ) ) {
return;
}

View File

@ -144,7 +144,7 @@ class WC_Product_Cat_List_Walker extends Walker {
* @param string $output Passed by reference. Used to append additional content.
* @return null Null on failure with no changes to parameters.
*/
public function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
if ( ! $element || ( 0 === $element->count && ! empty( $args[0]['hide_empty'] ) ) ) {
return;
}