In my plugin to configure some basic values using a woocommerce function which is creating a select field, but for some reason it generate this error: "Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/woocommerce/includes/admin/wc-meta-box-functions.php on line 192"
It works but the error message on the screen driving me crazy. I can change value and save and everything is perfectly fine except the message.
function spinna360_nof($noi) {
woocommerce_wp_select(
array(
'id' => '_select_noi',
'label' => __( 'Select number of images: ', 'spinna360' ),
'selected' => true,
'value' => $noi,
'options' => [
'24' => __( '24', 'spinna360' ),
'36' => __( '36', 'spinna360' ),
'48' => __( '48', 'spinna360' )
]
)
);
}
Why? What is the problem?