Title: maycal's Replies | WordPress.org

---

# maycal

  [  ](https://wordpress.org/support/users/maycal/)

 *   [Profile](https://wordpress.org/support/users/maycal/)
 *   [Topics Started](https://wordpress.org/support/users/maycal/topics/)
 *   [Replies Created](https://wordpress.org/support/users/maycal/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/maycal/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/maycal/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/maycal/engagements/)
 *   [Favorites](https://wordpress.org/support/users/maycal/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/maycal/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/maycal/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce: Allow to Pay Without Login For Existing User](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/#post-15051465)
 * Please, address you message to WooCommerce developers team.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sessions] sessions hang (not deleted)](https://wordpress.org/support/topic/sessions-hang-not-deleted/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/sessions-hang-not-deleted/#post-14702899)
 * The issue was solved by creating a special code that forcibly closes the session
   after the timer expires (a function that automatically starts in the plugin and
   forcibly checks sessions for the date of their expiration).
 * You need to download this file: [https://drive.google.com/file/d/14LjYdKB0VtULmRjcE6S9lwmSBZTNxgQc/view?usp=sharing](https://drive.google.com/file/d/14LjYdKB0VtULmRjcE6S9lwmSBZTNxgQc/view?usp=sharing)
 * and put it to:
 * /wp-content/plugins/sessions/includes/system/ (replace original class-session.
   php)
 * This is a code, that was added into original class-session.php (lines 1025 – 
   1064):
 *     ```
       public static function try_to_terminate_sessions() {
   
       		global $wpdb;
       		$cpt   = 0;
       		$limit = 0;
       		$index = 0;
       		$sql   = 'SELECT user_id, meta_value FROM ' . $wpdb->usermeta . " WHERE meta_key='session_tokens' ORDER BY user_id DESC LIMIT " . (int) Option::network_get( 'buffer_limit' );
       		// phpcs:ignore
       		$query = $wpdb->get_results( $sql, ARRAY_A );
       		if ( is_array( $query ) && 0 < count( $query ) ) {
       			if ( $limit > count( $query ) ) {
       				$index = 0;
       			} else {
       				$index += $limit;
       			}
       			foreach ( $query as $row ) {
       				$sessions = $row['meta_value'];
       				if ( ! is_array( $sessions ) && is_string( $sessions ) ) {
       					$sessions = maybe_unserialize( $sessions );
       				}
       				if ( is_array( $sessions ) ) {
       					$cpt += Session::auto_terminate_session( $sessions, (int) $row['user_id'] );
       				}
       			}
       			switch ( $cpt ) {
       				case 0:
       					\DecaLog\Engine::eventsLogger( POSE_SLUG )->debug( 'No session to auto-terminate.' );
       					break;
       				case 1:
       					\DecaLog\Engine::eventsLogger( POSE_SLUG )->notice( sprintf( '%d session auto-terminated.', $cpt ) );
       					break;
       				default:
       					\DecaLog\Engine::eventsLogger( POSE_SLUG )->notice( sprintf( '%d sessions auto-terminated.', $cpt ) );
       					break;
       			}
       		} else {
       			\DecaLog\Engine::eventsLogger( POSE_SLUG )->debug( 'No session to auto-terminate.' );
       			$index = 0;
       		}
       	}
       ```
   
 * And call of the fuction (line 952 in modified class-session.php)
 * `self::try_to_terminate_sessions();`
 * Tested with sessions version 2.3.0
    -  This reply was modified 4 years, 10 months ago by [maycal](https://wordpress.org/support/users/maycal/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sessions] sessions hang (not deleted)](https://wordpress.org/support/topic/sessions-hang-not-deleted/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/sessions-hang-not-deleted/#post-14667620)
 * The question is still relevant to me
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce: Allow to Pay Without Login For Existing User](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/#post-14605329)
 * The code I have provided above may not work with some payment gateways (payment
   methods).
 * If you will get “Bad gateway” error, then simply remove this line:
 * `wp_clear_auth_cookie();`
 * This line don’t need because there are to another lines:
 *     ```
       $yourSession= WP_Session_Tokens::get_instance($_SESSION['u']);
       $yourSession->destroy_all();
       ```
   
 * which kill sessions that was created to trick WooCommerce.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Picture] Change output image size](https://wordpress.org/support/topic/change-output-image-size/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-output-image-size/#post-14604012)
 * Earlier I used “Simple Local Avatar Plugin”
 * And this hook
 *     ```
       add_filter( 'pre_get_avatar_data', function( $args ) {
       	$args['size'] = 'full';
       	return $args;
       }, 5 );
       ```
   
 * worked! The image became large and clear in LearnPress profile.
 * I’d like to get similar hook for User Profile Picture plugin, could you help 
   me?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Picture] Change output image size](https://wordpress.org/support/topic/change-output-image-size/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-output-image-size/#post-14603794)
 * LSM LearnPress showing the image profile.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Profile Picture] Change output image size](https://wordpress.org/support/topic/change-output-image-size/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-output-image-size/#post-14603789)
 * LearnPress
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Simple Local Avatars] Possible to show larger image?](https://wordpress.org/support/topic/possible-to-show-larger-image/)
 *  [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/possible-to-show-larger-image/#post-14602570)
 * The code suggested by Tung Du worked for me too! Thank you!
 * P.S You need to put the code above to functions.php file of your child theme.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Payment gateway - Robokassa for WooCommerce] Комиссия с магазина, плагин не включается](https://wordpress.org/support/topic/%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%bd%d0%b5-%d0%b2%d0%ba%d0%bb%d1%8e%d1%87%d0%b0%d0%b5%d1%82%d1%81%d1%8f/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%bd%d0%b5-%d0%b2%d0%ba%d0%bb%d1%8e%d1%87%d0%b0%d0%b5%d1%82%d1%81%d1%8f/#post-14571289)
 * Оказалось, что комиссия так и так берется с магазина, даже если не стоит чек.
   Для покупателя цена не увеличивается. И это как раз то, что нужно
    -  This reply was modified 4 years, 12 months ago by [maycal](https://wordpress.org/support/users/maycal/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Payment gateway - Robokassa for WooCommerce] Комиссия с магазина, плагин не включается](https://wordpress.org/support/topic/%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%bd%d0%b5-%d0%b2%d0%ba%d0%bb%d1%8e%d1%87%d0%b0%d0%b5%d1%82%d1%81%d1%8f/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/%d0%bf%d0%bb%d0%b0%d0%b3%d0%b8%d0%bd-%d0%bd%d0%b5-%d0%b2%d0%ba%d0%bb%d1%8e%d1%87%d0%b0%d0%b5%d1%82%d1%81%d1%8f/#post-14571133)
 * Оказалось, что дело в чек-боксе “оплата комиссии за покупателя”. Если её установить,
   то плагин не включается.
 * Как активировать оплату комиссии за покупателя?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Cool Integration for LearnPress & WooCommerce] Disable the synchronization function between products](https://wordpress.org/support/topic/disable-the-synchronization-function-between-products/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [5 years ago](https://wordpress.org/support/topic/disable-the-synchronization-function-between-products/#post-14549592)
 * Hi! Here is the link, you can download the course-product-sync.php: [https://drive.google.com/file/d/1cGa6E3rrLGR-YAvLLhg4YKgzFAlhHUA6/view?usp=sharing](https://drive.google.com/file/d/1cGa6E3rrLGR-YAvLLhg4YKgzFAlhHUA6/view?usp=sharing)
 * If you will create a course, a product will create automatically.
 * But after creation, you can change the image and description of the course and
   this will not affect on image and description on product. Also, you can change
   the image and description of the product and this will not affect on image and
   description on the course.
 * Note, that my version of the “cool integration plugin” is 1.0
    -  This reply was modified 5 years ago by [maycal](https://wordpress.org/support/users/maycal/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce: Allow to Pay Without Login For Existing User](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [5 years ago](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/#post-14543082)
 * Forgot to say, that the code also allow to pay for open order without logging
   in. I mean that you can manually create an order in WooCommerce admin dashboard,
   and then give a link to customer for pay. So, with the code located above, the
   customer dont need to provide login and password. The customer can pay without
   any “you need to log in to pay for this order…”
 * So the code above do the two things:
 * 1. Allow pay for order without logging in during the usual order using “add to
   cart” (recognizing customer using e-mail that he provide at form during checkout
   and then add his new order to existing profile. It can be convenient for LMS 
   LearnPress for example – non-logged old user with old e-mail, buys a new course
   and new course automatically adding to his account)
 * 2. Allow pay for open order which been created through admin dashboard without
   needed of entrance in account from the side of an user.
    -  This reply was modified 5 years ago by [maycal](https://wordpress.org/support/users/maycal/).
    -  This reply was modified 5 years ago by [maycal](https://wordpress.org/support/users/maycal/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce: Allow to Pay Without Login For Existing User](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [5 years ago](https://wordpress.org/support/topic/woocommerce-allow-to-pay-for-order-without-login/#post-14543036)
 * This was not a support question, this was the **solution**. I wrote it to mark
   the topic as “resolved”.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] How to allow orders from existing customers in WooCommerce without logging in?](https://wordpress.org/support/topic/how-to-allow-orders-from-existing-customers-in-woocommerce-without-logging-in/)
 *  [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [5 years ago](https://wordpress.org/support/topic/how-to-allow-orders-from-existing-customers-in-woocommerce-without-logging-in/#post-14534064)
 * Is there any solution? Maybe WooCommerce developers wrote a plugin to allow orders
   from existing customers without logging in? Or maybe third party developer plugin?
   Or maybe working hook?
    -  This reply was modified 5 years ago by [maycal](https://wordpress.org/support/users/maycal/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PWA for WP - Progressive Web Apps Made Simple] App Splash Screen Icon FULL SIZE](https://wordpress.org/support/topic/app-splash-screen-icon-full-size-2/)
 *  Thread Starter [maycal](https://wordpress.org/support/users/maycal/)
 * (@maycal)
 * [5 years ago](https://wordpress.org/support/topic/app-splash-screen-icon-full-size-2/#post-14533236)
 * I got it!

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/users/maycal/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/maycal/replies/page/2/?output_format=md)