Title: Update selected printer programmatically, my solution
Last modified: January 4, 2023

---

# Update selected printer programmatically, my solution

 *  [arberdesign](https://wordpress.org/support/users/arberdesign/)
 * (@arberdesign)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/update-selected-printer-programmatically-my-solution/)
 * If you have multiple locations but only want to print to just ONE printer, there
   is a simple way to do this.
 * Assume there is Locations A and B and I want the website order to print to Location
   B because customer has requested fulfillment from Location B:
 * In your functions.php or within your plugin structure, include the following 
   code:
 * $location_name= ‘Location B’;
 * //$location_name; this would be the printer name in the settings page, it can
   be anything you want
 * update_option( ‘star-cloudprnt-printer-select’, $location_name);
 * //this calls the update function and passes a new value to the selected printer
   name argument
 * Not sure if anyone else intends to use the printers in this fashion but there
   it is incase you are wondering!
    -  This topic was modified 3 years, 4 months ago by [arberdesign](https://wordpress.org/support/users/arberdesign/).
    -  This topic was modified 3 years, 4 months ago by [arberdesign](https://wordpress.org/support/users/arberdesign/).

The topic ‘Update selected printer programmatically, my solution’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/star-cloudprnt-for-woocommerce_b4cfd9.
   svg)
 * [Star CloudPRNT for WooCommerce](https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/reviews/)

## Tags

 * [multiple](https://wordpress.org/support/topic-tag/multiple/)

 * 0 replies
 * 1 participant
 * Last reply from: [arberdesign](https://wordpress.org/support/users/arberdesign/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/update-selected-printer-programmatically-my-solution/)
 * Status: not a support question