Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent possible type error during WC_Install::create_options() #45730

Merged
merged 3 commits into from Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-type-error-create-options
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Prevent possible type error during install routine.
Expand Up @@ -163,7 +163,13 @@ protected function get_settings_for_section_core( $section_id ) {
*/
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 );
}

/**
Expand Down