maycal
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] WooCommerce: Allow to Pay Without Login For Existing UserPlease, address you message to WooCommerce developers team.
Forum: Plugins
In reply to: [Sessions] sessions hang (not deleted)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
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 3 years, 4 months ago by maycal.
Forum: Plugins
In reply to: [Sessions] sessions hang (not deleted)The question is still relevant to me
Forum: Plugins
In reply to: [WooCommerce] WooCommerce: Allow to Pay Without Login For Existing UserThe 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
In reply to: [User Profile Picture] Change output image sizeEarlier 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
In reply to: [User Profile Picture] Change output image sizeLSM LearnPress showing the image profile.
Forum: Plugins
In reply to: [User Profile Picture] Change output image sizeLearnPress
Forum: Plugins
In reply to: [Simple Local Avatars] Possible to show larger image?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.
Оказалось, что комиссия так и так берется с магазина, даже если не стоит чек. Для покупателя цена не увеличивается. И это как раз то, что нужно
- This reply was modified 3 years, 5 months ago by maycal.
Оказалось, что дело в чек-боксе “оплата комиссии за покупателя”. Если её установить, то плагин не включается.
Как активировать оплату комиссии за покупателя?
Hi! Here is the link, you can download the course-product-sync.php: 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 3 years, 5 months ago by maycal.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce: Allow to Pay Without Login For Existing UserForgot 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.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce: Allow to Pay Without Login For Existing UserThis was not a support question, this was the solution. I wrote it to mark the topic as “resolved”.
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 3 years, 5 months ago by maycal.
Forum: Plugins
In reply to: [PWA for WP & AMP] App Splash Screen Icon FULL SIZEI got it!