luckysistemi
Forum Replies Created
-
Forum: Plugins
In reply to: [New User Approve] problem with reset password pluginHi,
there is a safer way to manage this topic.
In fact usin lostpassword_post action is too late.you can use the filter
add_filter( 'allow_password_reset', array(&$this, 'lk_allow_pw_reset'), 10, 2 );
and replace the method lost_password withfunction lk_allow_pw_reset( $result, $user_id ) { $user_data = get_user_by( 'id', $user_id ); if ( $user_data->pw_user_status && $user_data->pw_user_status != 'approved' ) { $result = new WP_Error( 'unapproved_user', __( '<strong>ERROR</strong>: User has not been approved.', 'new-user-approve' ) ); } return $result; }- This reply was modified 5 years, 1 month ago by luckysistemi.
Forum: Plugins
In reply to: [New User Approve] woocommerce autologinI found that using
woocommerce_checkout_update_user_meta
hook is too early. No user meta are updated, neither user is correctly bind to the order.To fix this it should be used the hook
woocommerce_checkout_order_processedso this is correct:
add_action('woocommerce_checkout_order_processed', array(&$this, 'logoff_user'), 10, 0);Forum: Plugins
In reply to: [WP-Stateless - Google Cloud Storage] elementor CSS files pathI propose this solution that fix the problem:
file lib/classes/compatibility/elementor.php
add this in module_init function:
$root_dir = ud_get_stateless_media()->get('sm.root_dir'); $this->base_path = strtok($root_dir, '%');modify this line in sync_rewrite_url:
do_action('sm:sync::syncFile', $this->base_path.$name, $absolutePath);modify delete_elementor_files:
do_action('sm:sync::deleteFiles', $this->base_path.'elementor/');modify one line in delete_css_files:
do_action('sm:sync::deleteFile', $this->base_path.$name);modify one line in delete_global_css:
do_action('sm:sync::deleteFile', $this->base_path.$name);this fix the problem and allow to work in multisite setup.
I assume that the first part of the bucket path is common to all the sites.
The best could be to add a new option to specify this path- This reply was modified 5 years, 5 months ago by luckysistemi.