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. You can share this command with hosting provider so they can run to fix this issue or if you have WHM access you can run this command. cagefsctl --force-update && cagefsctl -M

    You can share this command with hosting provider so they can run to fix this issue or if you have WHM access you can run this command.

    cagefsctl --force-update && cagefsctl -M
    See less
  2. It's likely due to iThemes Security and its settings. To resolve this, access your wp-config file and set DISALLOW_FILE_EDIT to false: define( 'DISALLOW_FILE_EDIT', false ); Alternatively, you can disable it from the WordPress dashboard by navigating to Dashboard -> Security -> WordPress Tweaks -> Configure Settings, then unchecking "Disable File Editor".

    It’s likely due to iThemes Security and its settings. To resolve this, access your wp-config file and set DISALLOW_FILE_EDIT to false:

    define( 'DISALLOW_FILE_EDIT', false );

    Alternatively, you can disable it from the WordPress dashboard by navigating to Dashboard -> Security -> WordPress Tweaks -> Configure Settings, then unchecking “Disable File Editor”.

    See less
  3. When you use a term like filemtime without the $ sign, PHP interprets it as a constant, which needs to be defined first. The fourth argument of the wp_register_style function sets the version of your script. You can set it to false (the default) or define a constant first. For example, at the top of your file: define('VERSION', '1.0.0'); After that: wp_register_style('Naskh', get_stylesheet_uri(), [], VERSION, get_template_directory_uri() . '/fonts/naskh-webfont.woff', [], false, 'all'); This ensures that 'filemtime' is treated correctly.

    When you use a term like filemtime without the $ sign, PHP interprets it as a constant, which needs to be defined first. The fourth argument of the wp_register_style function sets the version of your script.

    You can set it to false (the default) or define a constant first. For example, at the top of your file:

    define('VERSION', '1.0.0');
    
    After that:
    
    wp_register_style('Naskh', get_stylesheet_uri(), [], VERSION, get_template_directory_uri() . '/fonts/naskh-webfont.woff', [], false, 'all');

    This ensures that ‘filemtime’ is treated correctly.

    See less
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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