*/
    public static function get_weekday($weekday_number)
    {
        global $wp_locale;
        if (7 == $weekday_number) {
            $weekday = $wp_locale->get_weekday(0);
        } else {
            $weekday = $wp_locale->get_weekday($weekday_number);
        }
        return $weekday;
    }
    /**
     * Automatically set a switch order's status to complete (even if the items require shipping because 
     * the order is simply a record of the switch and not indicative of an item needing to be shipped)
     *
     * @since 1.5.17
     */
    public static function order_autocomplete($new_order_status, $order_id)
    {
        if ('processing' == $new_order_status && self::order_contains_synced_subscription($order_id)) {
            $order = new WC_Order($order_id);
            if (1 == count($order->get_items()) && 0 == $order->get_total()) {
                // Can't use $order->get_item_count() because it takes quantity into account
                $new_order_status = 'completed';
            }
        }
        return $new_order_status;
    }
}
WC_Subscriptions_Synchroniser::init();