diff --git a/plugins/woocommerce/changelog/fix-type-error-create-options b/plugins/woocommerce/changelog/fix-type-error-create-options new file mode 100644 index 00000000000..c0f7ef21ce5 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-type-error-create-options @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Prevent possible type error during install routine. diff --git a/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php b/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php index 807d9431045..7af5777779c 100644 --- a/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php +++ b/plugins/woocommerce/includes/admin/settings/class-wc-settings-page.php @@ -163,7 +163,13 @@ if ( ! class_exists( 'WC_Settings_Page', false ) ) : */ public function get_sections() { $sections = $this->get_own_sections(); - return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections ); + /** + * Filters the sections for this settings page. + * + * @since 2.2.0 + * @param array $sections The sections for this settings page. + */ + return (array) apply_filters( 'woocommerce_get_sections_' . $this->id, $sections ); } /**