Looking for help?
< All Topics
Print

Make Shorter POS URL

As default , our POS panel url has this format : http://your_domain.com/wp-content/plugins/woocommerce-openpos/pos

If you want make this url shorter like as : http://yourdomain.com/pos you can do it follow this way:

#1 : COPY folder your_webroot/wp-content/plugins/woocommerce-openpos/pos to your_webroot/pos

#2: open file your_webroot/pos/index.php by your editor , Uncomment Line 9 ( remove “#”)

From

# $base_dir = dirname(__DIR__);  // uncommnent this line if you want change pos address to https://yoursite-address.com/pos/

To

 $base_dir = dirname(__DIR__);  // uncommnent this line if you want change pos address to https://yoursite-address.com/pos/

#3. Add this filter to your_active_theme/functions.php

function custom_pos_url($url)
{
   $url = site_url( '/pos/', 'https' );
   return $url;
}
add_filter('op_pos_url','custom_pos_url',10,1);

Done. Try accesshttp://yourdomain.com/pos and see the result

NOTE:

  • make sure your custom pos url protocol should match with you admin site url ( admin/setting/site url) : common error is : https / http
  • make sure match url, common error is different www / non-www

How to update when have new  version ? 

when have new version, release, after update plugin, you should update the New POS url follow this guide 

wordpress/wp-content/plugins/woocommerce-openpos/pos/assets  –> wordpress/pos/assets
wordpress/wp-content/plugins/woocommerce-openpos/pos/main.js –> wordpress/pos/main.js
wordpress/wp-content/plugins/woocommerce-openpos/pos/polyfills.js -> wordpress/pos/polyfills.js

…..
NO copy wordpress/wp-content/plugins/woocommerce-openpos/pos/index.php

after done, your pos already updated

Previous How to use woocommerce online payment method in POS
Table of Contents
[elementor-template id="5546"]