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. Add this filter to your_active_theme/functions.php or use code snippets plugin and add this code as snippet.

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

#2: open yourdomain.com/pos url on your browser, if got ERROR base dir do not exist notification. Goto file your_webroot/pos/index.php by your editor , Uncomment Line 22 ( remove “#”)

From

# $base_dir = 'ENTER_YOUR_WORDPRESS_BASE_PATH'; // enter your custom wordpress base dir and uncomment   

To

 $base_dir = 'ENTER_YOUR_WORDPRESS_BASE_PATH'; // enter your custom wordpress base dir and uncomment   

and update ENTER_YOUR_WORDPRESS_BASE_PATH to your wordpress dir path (this is location of wp-load.php file), it look like /var/www/html/wordpress

Done. Try access http://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

Table of Contents