Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

  1. Here is the simple method to make the directory if its not created. /** * recursively create a long directory path */ function createPath($path) { if (is_dir($path)) return true; $prev_path = substr($path, 0, strrpos($path, '/', -2) + 1 ); $return = createPath($prev_path); return ($return && is_writable($prev_path)) ? mkdir($path) : false; }

    Here is the simple method to make the directory if its not created.

    /**
     * recursively create a long directory path
     */
    function createPath($path) {
        if (is_dir($path)) 
            return true;
        $prev_path = substr($path, 0, strrpos($path, '/', -2) + 1 );
        $return = createPath($prev_path);
        return ($return && is_writable($prev_path)) ? mkdir($path) : false;
    }
    See less
  2. This answer was edited.

    You can try this code, tested and it worked, it is for child theme. add_action( 'woocommerce_checkout_process', 'wc_minimum_required_order_amount' ); add_action( 'woocommerce_before_cart' , 'wc_minimum_required_order_amount' ); function wc_minimum_required_order_amount() { // HERE Your settings $minimum_amount = 100; // The minimum cart total amount $shipping_method_id = 'local_pickup'; // The targeted shipping method Id (exception) // Get some variables $cart_total = (float) WC()->cart->total; // Total cart amount $chosen_methods = (array) WC()->session->get( 'chosen_shipping_methods' ); // Chosen shipping method rate Ids (array) // Only when a shipping method has been chosen if ( ! empty($chosen_methods) ) { $chosen_method = explode(':', reset($chosen_methods)); // Get the chosen shipping method Id (array) $chosen_method_id = reset($chosen_method); // Get the chosen shipping method Id } // If "Local pickup" shipping method is chosen, exit (no minimun is required) if ( issRead more

    You can try this code, tested and it worked, it is for child theme.

    add_action( 'woocommerce_checkout_process', 'wc_minimum_required_order_amount' );
    add_action( 'woocommerce_before_cart' , 'wc_minimum_required_order_amount' );
    function wc_minimum_required_order_amount() {
    
        // HERE Your settings
        $minimum_amount     = 100; // The minimum cart total amount
        $shipping_method_id = 'local_pickup'; // The targeted shipping method Id (exception)
    
        // Get some variables
        $cart_total     = (float) WC()->cart->total; // Total cart amount
        $chosen_methods = (array) WC()->session->get( 'chosen_shipping_methods' ); // Chosen shipping method rate Ids (array)
    
        // Only when a shipping method has been chosen
        if ( ! empty($chosen_methods) ) {
            $chosen_method  = explode(':', reset($chosen_methods)); // Get the chosen shipping method Id (array)
            $chosen_method_id = reset($chosen_method); // Get the chosen shipping method Id
        }
    
        // If "Local pickup" shipping method is chosen, exit (no minimun is required)
        if ( isset($chosen_method_id) && $chosen_method_id === $shipping_method_id ) {
            return; // exit
        }
    
        // Add an error notice is cart total is less than the minimum required
        if ( $cart_total < $minimum_amount ) {
            $text_notice = sprintf(
                __("The minimum required order amount is %s (your current order amount is %s).", "woocommerce"), // Text message
                wc_price( $minimum_amount ),
                wc_price( $cart_total )
            );
            
            if ( is_cart() ) {
                wc_print_notice( $text_notice, 'error' );
            } else {
                wc_add_notice( $text_notice, 'error' );
            }
        }
    }
    See less
  3. Use mysql -u root -p It will ask for password, insert password and enter.

    Use mysql -u root -p It will ask for password, insert password and enter.

    See less
  4. This answer was edited.

    If you prefer to receive an exception (MalformedPatternException) instead of warnings or relying on preg_last_error(), consider using the T-Regx library: <?php try { return pattern('invalid] pattern')->match($s)->all(); } catch (MalformedPatternException $e) { // your pattern was invalid }

    If you prefer to receive an exception (MalformedPatternException) instead of warnings or relying on preg_last_error(), consider using the T-Regx library:

    <?php
    try 
    {
    return pattern('invalid] pattern')->match($s)->all();
    }
    catch (MalformedPatternException $e) 
    {
    // your pattern was invalid
    }
    See less
  5. No, it doesn't make a difference. If you're using Cmd.exe, most of your commands are external, meaning they start an .exe as a separate process. This means their memory allocation only exists while the .exe is running. Once the process finishes, all of its resources (allocated memory, open files, etc.) are automatically cleaned up by the OS, not by Cmd.exe. In other words, resource cleanup is handled by your OS process management, not by the command shell, and the way you structure the command line doesn't affect it. This concern would be more relevant for commands that are internal to the shell. Cmd.exe has very few internal commands, whereas PowerShell allows for building large data structures within the shell's process. In theory, if you have PowerShell functions or cmdlets that handle large amounts of data, their objects might persist after the function returns. However, the CLR runtime will eventually perform garbage collection before it becomes a significant issue.

    No, it doesn’t make a difference.

    If you’re using Cmd.exe, most of your commands are external, meaning they start an .exe as a separate process. This means their memory allocation only exists while the .exe is running.

    Once the process finishes, all of its resources (allocated memory, open files, etc.) are automatically cleaned up by the OS, not by Cmd.exe.

    In other words, resource cleanup is handled by your OS process management, not by the command shell, and the way you structure the command line doesn’t affect it.

    This concern would be more relevant for commands that are internal to the shell. Cmd.exe has very few internal commands, whereas PowerShell allows for building large data structures within the shell’s process.

    In theory, if you have PowerShell functions or cmdlets that handle large amounts of data, their objects might persist after the function returns. However, the CLR runtime will eventually perform garbage collection before it becomes a significant issue.

    See less
  6. This answer was edited.

    Open the Camera desktop app, it will indicate that the Media Feature Pack is missing or available. Suggested path (Settings > Apps > Optional features) is mostly incorrect. Instead used the search bar in Settings to find Optional features. After installing the Media Feature Pack from there and restarting computer, the camera should work fine.

    Open the Camera desktop app, it will indicate that the Media Feature Pack is missing or available. Suggested path (Settings > Apps > Optional features) is mostly incorrect.

    Instead used the search bar in Settings to find Optional features. After installing the Media Feature Pack from there and restarting computer, the camera should work fine.

    See less
  7. This answer was edited.

    Hello Antonietta, You can add this code to .htaccess file of website and it should start working. <FilesMatch "^(xmlrpc\.php)"> Order Deny,Allow Allow from all </FilesMatch> <Files wp-cron.php> order deny,allow allow from all </Files>

    Hello Antonietta, You can add this code to .htaccess file of website and it should start working.

    <FilesMatch "^(xmlrpc\.php)">
    Order Deny,Allow
    Allow from all
    </FilesMatch>
    <Files wp-cron.php>
    order deny,allow
    allow from all
    </Files>
    See less