Prevent possible type error during `WC_Install::create_options()` (#45730)
* Prevent possible type error during `WC_Install::create_options() * Add changelog * document the `woocommerce_get_sections_' . $this->id` filter --------- Co-authored-by: Leif Singer <git@singer.sh>
This commit is contained in:
parent
3ef4fc88a5
commit
4ce5bb55b4
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Prevent possible type error during install routine.
|
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue