Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kaowinn

    (@kaowinn)

    Hello Igor, thank you. Is it enough?

    ### WordPress Environment ###
    
    WordPress address (URL): https://invest2biz.com
    Site address (URL): https://invest2biz.com
    WC Version: 7.5.0
    REST API Version: ?</img> 7.5.0
    WC Blocks Version: ?</img> 9.6.5
    Action Scheduler Version: ?</img> 3.5.4
    Log Directory Writable: ?</img>
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 256 Mo
    WP Debug Mode: –
    WP Cron: –
    Language: fr_FR
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: nginx/1.21.3
    PHP Version: 8.0.28
    PHP Post Max Size: 128 Mo
    PHP Time Limit: 300
    PHP Max Input Vars: 10000
    cURL Version: 7.68.0
    OpenSSL/1.1.1f
    
    SUHOSIN Installed: –
    MySQL Version: 10.5.12-MariaDB-1:10.5.12+maria~focal
    Max Upload Size: 128 Mo
    Default Timezone is UTC: ?</img>
    fsockopen/cURL: ?</img>
    SoapClient: ?</img>
    DOMDocument: ?</img>
    GZip: ?</img>
    Multibyte String: ?</img>
    Remote Post: ?</img>
    Remote Get: ?</img>
    
    ### Security ###
    
    Secure connection (HTTPS): ?</img>
    Hide errors from visitors: ?</img>
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: right_space
    Thousand Separator: 
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    Enforce Approved Product Download Directories: –
    Order datastore: WC_Order_Data_Store_CPT
    
    ### WC Pages ###
    
    Base de la boutique: #103 - /boutique/
    Panier: #104 - /panier/
    Commander: #105 - /commande/
    Mon compte: #106 - /mon-compte/
    Conditions générales de vente et d’utilisation: ?</img> Page non définie
    
    ### Theme ###
    
    Name: REIGN
    Version: 1.0.0
    Child Theme: ?</img>
    Parent Theme Name: REIGN
    Parent Theme Version: 2.9.8
    Parent Theme Author URL: https://wbcomdesigns.com/
    WooCommerce Support: ?</img>
    
    ### Templates ###
    
    Overrides: reign-theme/woocommerce/cart/cart.php version 3.8.0 est obsolète. La version du noyau est 7.4.0
    reign-theme/woocommerce/checkout/form-checkout.php
    reign-theme/woocommerce/global/quantity-input.php version 3.6.0 est obsolète. La version du noyau est 7.4.0
    reign-theme/woocommerce/single-product/tabs/tabs.php
    
    Outdated Templates: ?</img>
    					
    					
    						Apprenez comment mettre à jour
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    
    Disabled Features: minified-js
    new-product-management-experience
    product-variation-management
    settings
    
    Daily Cron: ?</img> Next scheduled: 2023-03-16 19:55:32 +01:00
    Options: ?</img>
    Notes: 116
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Terminé: 168
    Oldest: 2023-02-14 11:57:24 +0100
    Newest: 2023-03-16 13:02:02 +0100
    
    échoué: 10
    Oldest: 2020-01-29 05:13:45 +0100
    Newest: 2023-03-15 12:36:53 +0100
    
    En attente: 10
    Oldest: 2023-03-16 15:22:06 +0100
    Newest: 2023-03-23 13:02:02 +0100
    
    
    ### Status report information ###
    
    Generated at: 2023-03-16 15:22:17 +01:00
    `
    Thread Starter kaowinn

    (@kaowinn)

    Hello Igor, thank you for your help.

    The steps made on our website, we updated plugins. (is it the question?) Except that, we didn’t do specific actions on the website. I am not able to say when did the error appeared.

    We are using “PaidMemberShip Pro” to manage membership. Same thing, no changed from long time except plugin update.

    I saw the error only into “Order List”, from “PaidMemberShip Pro” plugin.

    Thank you very much,

    Thread Starter kaowinn

    (@kaowinn)

    I try to roll back, but I have an error :

    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /www/wp-includes/capabilities.php:692 Stack trace: #0 /www/wp-content/plugins/learnpress/inc/admin/lp-admin-actions.php(19): current_user_can('manage_options') #1 /www/wp-includes/class-wp-hook.php(292): _learn_press_set_user_items(Object(WP_Query)) #2 /www/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /www/wp-includes/plugin.php(551): WP_Hook->do_action(Array) #4 /www/wp-includes/class-wp-query.php(1784): do_action_ref_array('pre_get_posts', Array) #5 /www/wp-includes/class-wp-query.php(3465): WP_Query->get_posts() #6 /www/wp-includes/post.php(2153): WP_Query->query(Array) #7 /www/wp-content/plu in /www/wp-includes/capabilities.php on line 692

    Thread Starter kaowinn

    (@kaowinn)

    Hello again ??

    I found a way. I created the following code into a custom plugin :

    /**
     * fr : Mise à jour de la politique de validation du MDP avec learnpress
     * en : Update password policy on learnpress
     */
    add_filter( 'learn-press/register-validate-field', 'oc_register_validate_field', 15, 3 );
    function oc_register_validate_field( $name, $field, $value ) {
        $validate = ! ! $value;
    
        /*error_log('oc_register_validate_field reg_password ' . json_encode([
            'name' => $name,
            'field' => $field,
            'field-id' => $field['id'],
            'value' => $value,
        ]));/**/
        if ( $validate && $field['id'] === 'reg_password' ) {
            try {
                if ( strlen( $value ) < 8 ) {
                    throw new Exception( __( 'Password is too short!', 'learnpress' ), 100 );
                }
    
                /* if ( preg_match( '#\s+#', $value ) ) {
                    throw new Exception( __( 'Password can not have spacing!', 'learnpress' ), 110 );
                }/**/
    
                if ( ! preg_match( "#[a-zA-Z]+#", $value ) ) {
                    throw new Exception( __( 'Password must include at least one letter!', 'learnpress' ), 120 );
                }/**/
    
                /* if ( ! preg_match( "#[A-Z]+#", $value ) ) {
                    throw new Exception( __( 'Password must include at least one capitalized letter!', 'learnpress' ), 125 );
                }/**/
    
                if ( ! preg_match( "#[0-9]+#", $value ) ) {
                    throw new Exception( __( 'Password must include at least one number!', 'learnpress' ), 125 );
                }/**/
    
                /* if ( ! preg_match( '#[~!@\#$%^&*()]#', $value ) ) {
                    throw new Exception( __( 'Password must include at least one of these characters ~!@#$%^&*() !', 'learnpress' ), 125 );
                }
                /**/
            } catch ( Exception $ex ) {
                $validate = new WP_Error( $ex->getCode(), $ex->getMessage() );
            }
        }
    
        return $validate;
    }
    /**/

    Hope it cans help other people. It works with Learnpress (Version 3.2.7.9).
    But, be careful, I voluntary decrease to minimum requirement of my user password because I do not host any private data and I prefer to build the most user friend experience. Please think twice before use this code.

Viewing 4 replies - 1 through 4 (of 4 total)