Commit 63ced34e2 for woocommerce

commit 63ced34e2d5adfa69dba4da0aee6d22420c9a3bb
Author: Nestor Soriano <nestor.soriano@automattic.com>
Date:   Fri Oct 16 13:08:31 2020 +0200

    Convert optional-before-required arguments to required (take 2)

    In PHP 8 required parameters after optional parameters in
    function/method signatures trigger a deprecation notice. These type
    of parameters are pointless since a value needs to always be
    provided for them anyway, so they are actually de-facto required.

    This commit converts all these not-so-optional parameters into
    truly required parameters by removing their default values.

diff --git a/includes/admin/class-wc-admin-taxonomies.php b/includes/admin/class-wc-admin-taxonomies.php
index bb212d69f..82651dbc6 100644
--- a/includes/admin/class-wc-admin-taxonomies.php
+++ b/includes/admin/class-wc-admin-taxonomies.php
@@ -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 ) ) {
diff --git a/includes/walkers/class-wc-product-cat-dropdown-walker.php b/includes/walkers/class-wc-product-cat-dropdown-walker.php
index 4b64298bf..9f525872f 100644
--- a/includes/walkers/class-wc-product-cat-dropdown-walker.php
+++ b/includes/walkers/class-wc-product-cat-dropdown-walker.php
@@ -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;
 		}
diff --git a/includes/walkers/class-wc-product-cat-list-walker.php b/includes/walkers/class-wc-product-cat-list-walker.php
index cdd1fbba5..358018404 100644
--- a/includes/walkers/class-wc-product-cat-list-walker.php
+++ b/includes/walkers/class-wc-product-cat-list-walker.php
@@ -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;
 		}