highwind
highwind copied to clipboard
Undefined index notices when in WP_DEBUG for woocommerce integrations
I had to turn on WP_DEBUG for a moment and got several undefined index notices for includes/integrations/woocommerce/functions.php
.
Basically you're trying to fetch data from $options
when they don't exist. Ideally you'd check for isset()
first.
function highwind_woocommerce_layout_classes( $classes ) {
$options = get_option( 'highwind_woocommerce_options' );
$archive_fullwidth = isset( $options['archive_fullwidth'] ) ? $options['archive_fullwidth'] : null;
$details_fullwidth = isset( $options['details_fullwidth'] ) ? $options['details_fullwidth'] : null;
Cheers, Vinny