WordPress.org

Ready to get started?Download WordPress

Forums

Minimum Purchase for WooCommerce
[resolved] Deployed to live environment - plugin not working (14 posts)

  1. marketinglift
    Member
    Posted 4 months ago #

    We just deployed to the live environment and the rule is no longer working. We tried uninstalling then reinstalling but no luck. I wish I had more insight but other than it not working, yeah, that's about it.

    Site is here: bodysolutionsystems.com
    It's still propagating so you might get the old site.

    https://wordpress.org/plugins/minimum-purchase-for-woocommerce/

  2. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

    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

  3. marketinglift
    Member
    Posted 4 months ago #

    Yeah, pretty much which has me scratching my head.

    Thanks for the quick response!

  4. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

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

  5. marketinglift
    Member
    Posted 4 months ago #

    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.

  6. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

    Are you using https or have an https plugin?

  7. marketinglift
    Member
    Posted 4 months ago #

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

  8. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

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

  9. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

    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;
      }
  10. marketinglift
    Member
    Posted 4 months ago #

    Great, thank you!

  11. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

    let me know if that does the job for you...

  12. marketinglift
    Member
    Posted 4 months ago #

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

  13. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

  14. varktech.com
    Member
    Plugin Author

    Posted 4 months ago #

    marking the topic as resolved...

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.