Support » Plugin: Minimum Purchase for WooCommerce » Deployed to live environment – plugin not working

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author vark

    (@vark)

    Hi,
    I guess you’re saying that it worked in a test environment, but not the live one? If so, is the live environment an exact duplicate of the test environment?
    Vark

    Yeah, pretty much which has me scratching my head.

    Thanks for the quick response!

    Plugin Author vark

    (@vark)

    Hi,
    No problem. Does ‘pretty much’ mean exact duplicate?

    Yeah, exact duplicate. I’ve got the dev environment up and the live environment and I’m making sure everything is correct. Whenever I add product to the live site that’s under $50 I no longer get the warning.

    Plugin Author vark

    (@vark)

    Are you using https or have an https plugin?

    HTTPS, also using authorize.net AIM plugin and Fed Ex plugin.

    Plugin Author vark

    (@vark)

    OK, I have an https-related fix which is coming out in the next few days. I’ll post it here for you momentarily.

    Plugin Author vark

    (@vark)

    In woo-integration/vtmin-parent-cart-validation.php
    
    replace lines 150-165 with the following:
    
      /* ************************************************
      **   Application - get current page url
      *
      *       The code checking for 'www.' is included since
      *       some server configurations do not respond with the
      *       actual info, as to whether 'www.' is part of the
      *       URL.  The additional code balances out the currURL,
      *       relative to the Parent Plugin's recorded URLs
      *************************************************** */
     public  function vtmin_currPageURL() {
         global $vtmin_info;
         $currPageURL = $this->vtmin_get_currPageURL();
         $www = 'www.';
    
         $curr_has_www = 'no';
         if (strpos($currPageURL, $www )) {
             $curr_has_www = 'yes';
         }
    
         //use checkout URL as an example of all setup URLs
         $checkout_has_www = 'no';
         if (strpos($vtmin_info['woo_checkout_url'], $www )) {
             $checkout_has_www = 'yes';
         }     
    
         switch( true ) {
            case ( ($curr_has_www == 'yes') && ($checkout_has_www == 'yes') ):
            case ( ($curr_has_www == 'no')  && ($checkout_has_www == 'no') ):
                //all good, no action necessary
              break;
            case ( ($curr_has_www == 'no') && ($checkout_has_www == 'yes') ):
                //reconstruct the URL with 'www.' included.
                $currPageURL = $this->vtmin_get_currPageURL($www);
              break;
            case ( ($curr_has_www == 'yes') && ($checkout_has_www == 'no') ):
                //all of the woo URLs have no 'www.', and curr has it, so remove the string
                $currPageURL = str_replace($www, "", $currPageURL);
              break;
         } 
    
         return $currPageURL;
      }
     public  function vtmin_get_currPageURL($www = null) {
         global $vtmin_info;
         $pageURL = 'http';
         //if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
         if ( isset( $_SERVER["HTTPS"] ) && strtolower( $_SERVER["HTTPS"] ) == "on" ) { $pageURL .= "s";}
         $pageURL .= "://";
         $pageURL .= $www;   //mostly null, only active rarely, 2nd time through - see above
    
         //NEVER create the URL with the port name!!!!!!!!!!!!!!
         $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
         /*
         if ($_SERVER["SERVER_PORT"] != "80") {
            $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
         } else {
            $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
         }
         */
         return $pageURL;
      }

    Great, thank you!

    Plugin Author vark

    (@vark)

    let me know if that does the job for you…

    Perfect! Thank you very much. Very impressed with the support!

    Plugin Author vark

    (@vark)

    Plugin Author vark

    (@vark)

    marking the topic as resolved…

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Deployed to live environment – plugin not working’ is closed to new replies.