Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter venigo

    (@venigo)

    Hi Ewout,

    Seems to be an array. Any idea how to fix this one maybe? The data send seems to be modified by this plugin?

    Call to a member function get_user() on integer

    Thread Starter venigo

    (@venigo)

    Hi Ewout,

    My apologizes.. Seems to be an error with the yith plugin….

    [Mon Sep 10 12:13:36.473914 2018] [:error] [pid 18972:tid 140096749606656] [client ****:24522] FastCGI: server "/var/run/php71-cgi/php-cgi" stderr: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get_user() on integer in /www/wp-content/plugins/yith-woocommerce-delivery-date-premium/includes/emails/class.yith-delivery-date-advise-customer-email.php:48, referer: https://www.****.com/wp-admin/post.php?post=11133&action=edit
    

    Hi Algoritmika,

    I notice that the payment and gateway fees are not working Yith Multi Step Checkout..

    What function (after… total count) is called? So that it can be added.

                /* WooCommerce Multiple Shipping Support */
                if( class_exists('WC_Ship_Multiple') ){
                    global $wcms;
                    if( $wcms ){
                        remove_action( 'woocommerce_before_checkout_form', array( $wcms->checkout, 'before_checkout_form' ) );
                        add_action( 'woocommerce_checkout_shipping', array( $wcms->checkout, 'before_checkout_form' ) );
                    }
                }
    Thread Starter venigo

    (@venigo)

    All plugins disabled..

    Switched the theme to a default one… Works..
    Switched back to my custom the.. Works..

    Seems to be a old template cache in the databases?

    Thread Starter venigo

    (@venigo)

    Next thing I get with debug this:

    No rules defined.
    Debug This Mode: rewrites – A list of all cached rewrites. To refresh the cache, visit Settings->Permalinks

    Current Rewrite

    Matched Rule:
    Matched Query:
    Query String: debug-this=rewrites

    Rewrite Rules

    Thread Starter venigo

    (@venigo)

    After clean up, permalinks still broken.. Other wp sites on my vps are working correct with same config on nginx… Really wtf

    location ^~ /.well-known/acme-challenge/ {
    alias /var/www/letsencrypt.sh/;
      allow all;
      #deny all;
    }
    
    location / {
            try_files $uri $uri/ /index.php?$args;
    }
    
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
    # Directives to send expires headers and turn off 404 error logging.
    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
           access_log off; log_not_found off; expires max;
    }
    
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
    # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
    location ~ /\. {
        deny all;
    }
    # Deny access to any files with a .php extension in the uploads directory
    # Works in sub-directory installs and also in multisite network
    # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
    location ~* /(?:uploads|files)/.*\.php$ {
        deny all;
    }
    Thread Starter venigo

    (@venigo)

    location ^~ /.well-known/acme-challenge/ {
    alias /var/www/letsencrypt.sh/;
      allow all;
      #deny all;
    }
    
    # This order might seem weird - this is attempted to match last if rules below fail.
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
    # Directives to send expires headers and turn off 404 error logging.
    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
           access_log off; log_not_found off; expires max;
    }
    
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
    # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
    location ~ /\.(htaccess|htpasswd|DS_Store) {
        deny all;
    }
    
    location ~ /\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
               add_header Access-Control-Allow-Origin "*";
    }
    
    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
    }
    
        ## Block SQL injections
        set $block_sql_injections 0;
        if ($query_string ~ "union.*select.*\(") {
            set $block_sql_injections 1;
        }
        if ($query_string ~ "union.*all.*select.*") {
            set $block_sql_injections 1;
        }
        if ($query_string ~ "concat.*\(") {
            set $block_sql_injections 1;
        }
        if ($block_sql_injections = 1) {
            return 403;
        }
    
        ## Block file injections
        set $block_file_injections 0;
        if ($query_string ~ "[a-zA-Z0-9_]=https://") {
            set $block_file_injections 1;
        }
        if ($query_string ~ "[a-zA-Z0-9_]=(\.\.//?)+") {
            set $block_file_injections 1;
        }
        if ($query_string ~ "[a-zA-Z0-9_]=/([a-z0-9_.]//?)+") {
            set $block_file_injections 1;
        }
        if ($block_file_injections = 1) {
            return 403;
        }
    
        ## Block common exploits
        set $block_common_exploits 0;
        if ($query_string ~ "(<|%3C).*script.*(>|%3E)") {
            set $block_common_exploits 1;
        }
        if ($query_string ~ "GLOBALS(=|\[|\%[0-9A-Z]{0,2})") {
            set $block_common_exploits 1;
        }
        if ($query_string ~ "_REQUEST(=|\[|\%[0-9A-Z]{0,2})") {
            set $block_common_exploits 1;
        }
        if ($query_string ~ "proc/self/environ") {
            set $block_common_exploits 1;
        }
        if ($query_string ~ "mosConfig_[a-zA-Z_]{1,21}(=|\%3D)") {
            set $block_common_exploits 1;
        }
        if ($query_string ~ "base64_(en|de)code\(.*\)") {
            set $block_common_exploits 1;
        }
        if ($block_common_exploits = 1) {
            return 403;
        }
    
        ## Block spam
        set $block_spam 0;
        if ($query_string ~ "\b(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(erections|hoodia|huronriveracres|impotence|levitra|libido)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(ambien|blue\spill|cialis|cocaine|ejaculation|erectile)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby)\b") {
            set $block_spam 1;
        }
        if ($block_spam = 1) {
            return 403;
        }
    
        ## Block user agents
        set $block_user_agents 0;
    
        # Don't disable wget if you need it to run cron jobs!
        #if ($http_user_agent ~ "Wget") {
        #    set $block_user_agents 1;
        #}
    
        # Disable Akeeba Remote Control 2.5 and earlier
        if ($http_user_agent ~ "Indy Library") {
            set $block_user_agents 1;
        }
    
        # Common bandwidth hoggers and hacking tools.
        if ($http_user_agent ~ "libwww-perl") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "GetRight") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "GetWeb!") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "Go!Zilla") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "Download Demon") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "Go-Ahead-Got-It") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "TurnitinBot") {
            set $block_user_agents 1;
        }
        if ($http_user_agent ~ "GrabNet") {
            set $block_user_agents 1;
        }
    
        if ($block_user_agents = 1) {
            return 403;
        }
    
    # BEGIN W3TC Minify cache
    location ~ /content/cache/minify.*\.js$ {
        types {}
        default_type application/x-javascript;
        expires modified 31536000s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding";
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
    }
    location ~ /content/cache/minify.*\.css$ {
        types {}
        default_type text/css;
        expires modified 31536000s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding";
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
    }
    location ~ /content/cache/minify.*js\.gzip$ {
        gzip off;
        types {}
        default_type application/x-javascript;
        expires modified 31536000s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding";
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
        add_header Content-Encoding gzip;
    }
    location ~ /content/cache/minify.*css\.gzip$ {
        gzip off;
        types {}
        default_type text/css;
        expires modified 31536000s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding";
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
        add_header Content-Encoding gzip;
    }
    # END W3TC Minify cache
    # BEGIN W3TC Minify core
    set $w3tc_enc "";
    if ($http_accept_encoding ~ gzip) {
        set $w3tc_enc .gzip;
    }
    if (-f $request_filename$w3tc_enc) {
        rewrite (.*) $1$w3tc_enc break;
    }
    rewrite ^/content/cache/minify/ /index.php last;
    # END W3TC Minify core
    # BEGIN W3TC Page Cache core
    set $w3tc_rewrite 1;
    if ($request_method = POST) {
        set $w3tc_rewrite 0;
    }
    if ($query_string != "") {
        set $w3tc_rewrite 0;
    }
    if ($request_uri !~ \/$) {
        set $w3tc_rewrite 0;
    }
    if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
        set $w3tc_rewrite 0;
    }
    if ($http_user_agent ~* "(W3\ Total\ Cache)") {
        set $w3tc_rewrite 0;
    }
    set $w3tc_ua "";
    if ($http_user_agent ~* "(240x320|2\.0\ mmp|\bppc\b|alcatel|amoi|asus|au\-mic|audiovox|avantgo|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3\.0|ericsson|eudoraweb|fly|haier|hiptop|hp\.ipaq|htc|huawei|i\-mobile|iemobile|iemobile/7|iemobile/9|j\-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\ vx|midp|midp\-2\.0|mmef20|mmp|mobilephone|mot\-v|motorola|msie\ 10\.0|netfront|newgen|newt|nintendo\ ds|nintendo\ wii|nitro|nokia|novarra|o2|openweb|opera\ mobi|opera\.mobi|p160u|palm|panasonic|pantech|pdxgw|pg|philips|phone|playbook|playstation\ portable|portalmmm|proxinet|psp|qtek|sagem|samsung|sanyo|sch|sch\-i800|sec|sendo|sgh|sharp|sharp\-tq\-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\ os|symbianos|toshiba|treo|ts21i\-10|up\.browser|up\.link|uts|vertu|vodafone|wap|willcome|windows\ ce|windows\.ce|winwap|xda|xoom|zte)") {
        set $w3tc_ua _low;
    }
    if ($http_user_agent ~* "(acer\ s100|android|archos5|bada|bb10|blackberry9500|blackberry9530|blackberry9550|blackberry\ 9800|cupcake|docomo\ ht\-03a|dream|froyo|googlebot-mobile|htc\ hero|htc\ magic|htc_dream|htc_magic|iemobile/7.0|incognito|ipad|iphone|ipod|kindle|lg\-gw620|liquid\ build|maemo|mot\-mb200|mot\-mb300|nexus\ 7|nexus\ one|opera\ mini|s8000|samsung\-s8000|series60.*webkit|series60/5\.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t\-mobile\ mytouch\ 3g|t\-mobile\ opal|tattoo|touch|webmate|webos)") {
        set $w3tc_ua _high;
    }
    set $w3tc_preview "";
    if ($http_cookie ~* "(w3tc_preview)") {
        set $w3tc_preview _preview;
    }
    set $w3tc_ssl "";
    if ($scheme = https) {
        set $w3tc_ssl _ssl;
    }
    set $w3tc_enc "";
    if ($http_accept_encoding ~ gzip) {
        set $w3tc_enc _gzip;
    }
    if (!-f "$document_root/content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ua$w3tc_ssl$w3tc_preview.html$w3tc_enc") {
      set $w3tc_rewrite 0;
    }
    if ($w3tc_rewrite = 1) {
        rewrite .* "/content/cache/page_enhanced/$http_host/$request_uri/_index$w3tc_ua$w3tc_ssl$w3tc_preview.html$w3tc_enc" last;
    }
    # END W3TC Page Cache core
    # BEGIN W3TC Page Cache cache
    location ~ /content/cache/page_enhanced.*html$ {
        expires modified 3600s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding, Cookie";
        add_header Pragma "public";
        add_header Cache-Control "max-age=3600, public";
    }
    location ~ /content/cache/page_enhanced.*gzip$ {
        gzip off;
        types {}
        default_type text/html;
        expires modified 3600s;
        add_header X-Powered-By "W3 Total Cache/0.9.5";
        add_header Vary "Accept-Encoding, Cookie";
        add_header Pragma "public";
        add_header Cache-Control "max-age=3600, public";
        add_header Content-Encoding gzip;
    }
    # END W3TC Page Cache cache
    # BEGIN W3TC Browser Cache
    gzip on;
    gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint application/x-shockwave-flash image/tiff application/x-font-ttf audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel;
    location ~ (robots\.txt|[a-z0-9_\-]*sitemap[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?|([a-z]+)?-?sitemap.xsl|([a-z]+)?-?sitemap_index.xml) {
        try_files $uri $uri/ $uri.html /index.php?$args;
    }
    location ~ \.(css|htc|less|js|js2|js3|js4)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
        add_header X-Powered-By "W3 Total Cache/0.9.5";
    }
    location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd)$ {
        expires 3600s;
        add_header Pragma "public";
        add_header Cache-Control "max-age=3600, public";
        add_header X-Powered-By "W3 Total Cache/0.9.5";
    }
    location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip)$ {
        expires 31536000s;
        add_header Pragma "public";
        add_header Cache-Control "max-age=31536000, public";
        add_header X-Powered-By "W3 Total Cache/0.9.5";
    }
    # END W3TC Browser Cache

    This is my current nginx conf.. I will try with reinstalling wt3c

    Thread Starter venigo

    (@venigo)

    I resaved the permalink settings indeed. Updated the nginx conf of wt3c.. Then ‘ngibx -t’ no errors, then restarted… I turned on the standard permalink settings.. Everything on post settings redirects to root url…

    Thread Starter venigo

    (@venigo)

    Solved after some trail and error.. Could be nicer, but it is working at my side.
    Note I am in the Netherlands we use the , instead of . (woocommerce is also configured on , as decimal..).

    Total price based on variation @ theme / functions.php

        // hook this on priority 31, display below add to cart button.
        add_action( 'woocommerce_single_product_summary', 'woocommerce_total_product_variation_price', 31 );
        function woocommerce_total_product_variation_price() {
        global $woocommerce, $product;
        // setup base html... We are going to rewrite this with the standard selected variation
        echo sprintf('<div id="product_total_price" style="margin-bottom:20px; display: block;">%s %s</div>',__('Totaal Prijs:','woocommerce'),'<span class="price">'.$product->get_price().'</span>');
        ?>
            <script>
                jQuery(function($){
    				
                var currency    = currency = ' <?php echo get_woocommerce_currency_symbol(); ?>';
     
    				function priceformat() {
    					var product_total = parseFloat(jQuery('.woocommerce-variation-price .amount').text().replace(/ /g ,'').replace(/€/g ,'').replace(/,/g ,'.')) * parseFloat(jQuery('.qty').val());
    					var product_total2 = product_total.toFixed(2);
    					var product_total3 = product_total2.toString().replace(/\./g, ',');
    					
    					jQuery('#product_total_price .price').html( currency + ' ' + product_total3);
    				}
     
                    jQuery('[name=quantity]').change(function(){
    					priceformat();
    		        });
    				
    				jQuery('body').on('change','.variations select',function(){
    					priceformat();				
    				});
    				
    				priceformat();
    				
                });
            </script>
        <?php }
Viewing 9 replies - 1 through 9 (of 9 total)