Category Archives: Без рубрики

How to Import all users passwords from osCommerce to WordPress (WooCommerece)

Import all users to WordPress with it’s passwords to WordPress using WP All Import

Then just insert this code to functions.php file.

It will override osCommerce password hashes when user logins.

if (!function_exists('wp_check_password')){
    function wp_check_password( $password, $hash, $user_id = '' ) {
        global $wp_hasher;
        $hashArray = explode(':', $hash);
        if (
            strpos('$P$B', $hash) === false &&
            count($hashArray) == 2 &&
            strlen($hashArray[0]) <= 32 &&
            strlen($hashArray[1]) <= 2
        ) {
            $twoCharsPlusPass = $hashArray[1] . $password;
            $check = hash_equals($hash, md5($twoCharsPlusPass) . ':' . $hashArray[1]);
            if ( $check && $user_id ) {
                wp_set_password($password, $user_id);
                $hash = wp_hash_password($password);
                return apply_filters('check_password', $check, $password, $hash, $user_id);
        else if ( strlen( $hash ) <= 32 ) {
            $check = hash_equals( $hash, md5( $password ) );
            if ( $check && $user_id ) {
                wp_set_password( $password, $user_id );
                $hash = wp_hash_password( $password );
            return apply_filters( 'check_password', $check, $password, $hash, $user_id );
        if ( empty( $wp_hasher ) ) {
            require_once ABSPATH . WPINC . '/class-phpass.php';
            $wp_hasher = new PasswordHash( 8, true );
        $check = $wp_hasher->CheckPassword( $password, $hash );
        return apply_filters( 'check_password', $check, $password, $hash, $user_id );

How to start doing your work when you don’t want even get up and go to the kitchen if you are pretty hungry

I can’t tell for everyone, however what I confidently know is what I should do. The very first task is fall on the floor and try to do some sports for about 20 minutes, next do you best to a short checklist of the tasks you have to complete. Then make a cup of tea, get to your working place and the last, as well as the most difficult and important point is closing the YouTube tab and Instagram app also. Get involved into your checklist for 4 hours, but don’t break any of the points, I have mentioned above, otherwise start all the algorithm again from very beginning.

To cut the long story short, if you aren’t able to complete your work, you will become a strongman or die of hunger.