• There is a definite bug in your code (1 so far)

    WooPickupShipping.php line 535 to 541
    The variabel $selectedShift is used even if not set due to the conditions not being met, so should be defined beforehand.

     if (isset($_SESSION['picup_scheduled_selected_shift']) && !empty($_SESSION['picup_scheduled_selected_shift'])) {
                $selectedShift = sanitize_text_field($_SESSION['picup_scheduled_selected_shift']);
    
                $args['default'] = $selectedShift;
            }
    $this->woocommerceAdapter->woocommerceFormField('picup_scheduled_shift', $args, $selectedShift);

    This results in

    Notice: Undefined variable: selectedShift in /var/www/wip.southcoasthosting.com/wp-content/plugins/woo-picup-shipping/src/WooPicupShipping.php on line 541

    The page I need help with: [log in to see the link]

The topic ‘First Bug’ is closed to new replies.