Skip to content

Commit 4890c28

Browse files
committed
Version 1 Release!
1 parent e47537f commit 4890c28

File tree

8 files changed

+41
-9
lines changed

8 files changed

+41
-9
lines changed

includes/API/Auth.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ public function generate_token( WP_REST_Request $request ) {
218218
);
219219
}
220220

221+
/**
222+
* @TODO
223+
* I'm not sure if this is the best way, but I need the user to be logged in for subsequent processing
224+
*/
225+
wp_set_current_user( $user->ID );
226+
221227
/** Valid credentials, the user exists create the according Token */
222228
$issued_at = time();
223229

includes/API/Stores.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ public function get_stores() {
2929
$this->get_store(),
3030
);
3131

32-
return $data;
33-
34-
// return rest_ensure_response( $data );
32+
/**
33+
*
34+
*/
35+
return apply_filters( 'woocommerce_pos_stores', $data, $this );
3536
}
3637

3738

includes/Templates/Frontend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function footer(): void {
119119
'avatar_url' => get_avatar_url( $user->ID ),
120120
'wp_nonce' => wp_create_nonce( 'wp_rest' ),
121121
),
122-
'store' => $store_settings->get_store(),
122+
'stores' => $store_settings->get_stores(),
123123
);
124124

125125
/**

includes/Templates/Payment.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ public function get_template(): void {
135135
wp_die( esc_html__( 'Sorry, this order has already been paid for.', 'woocommerce-pos' ) );
136136
}
137137

138+
// get cashier from order meta_data with key _pos_user
139+
$cashier = $order->get_meta( '_pos_user', true );
140+
$cashier = get_user_by( 'id', $cashier );
141+
138142
// set customer
139143
wp_set_current_user( $order->get_customer_id() );
140144

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wcpos/woocommerce-pos",
3-
"version": "1.0.0-rc.1",
3+
"version": "1.0.0",
44
"description": "A simple front-end for taking WooCommerce orders at the Point of Sale.",
55
"main": "index.js",
66
"workspaces": {

readme.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: kilbot
33
Tags: cart, e-commerce, ecommerce, inventory, point-of-sale, pos, sales, sell, shop, shopify, store, vend, woocommerce, wordpress-ecommerce
44
Requires at least: 5.6 & WooCommerce 5.3
5-
Tested up to: 6
6-
Stable tag: 0.4.27
5+
Tested up to: 6.2
6+
Stable tag: 1.0.0
77
License: GPL-3.0
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -62,3 +62,10 @@ There is more information on our website at [https://wcpos.com](https://wcpos.co
6262
1. WooCommerce POS main screen
6363

6464
== Changelog ==
65+
66+
= 1.0.0 =
67+
* Complete rewrite of the plugin with improved functionality and performance.
68+
* Although extensive testing has been done, there may still be bugs.
69+
* We recommend updating only when you have time to deal with potential issues.
70+
* You can always revert to the old version if necessary, https://wordpress.org/plugins/woocommerce-pos/advanced/
71+
* If you need assistance, join our Discord chat at https://wcpos.com/discord for support.

templates/payment.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@
6262
margin-bottom: 20px;
6363
}
6464

65+
.cashier {
66+
padding: 5px;
67+
}
68+
69+
.cashier .cashier-name {
70+
font-size: 14px;
71+
font-weight: bold;
72+
}
73+
6574
.current-user {
6675
padding: 5px;
6776
margin-bottom: 20px;
@@ -205,6 +214,11 @@
205214
<div class="woocommerce">
206215
<?php woocommerce_output_all_notices(); ?>
207216

217+
<div class="cashier">
218+
<span><?php esc_html_e( 'Cashier: ', 'woocommerce-pos' ); ?></span>
219+
<span class="cashier-name"><?php echo esc_html( $cashier->display_name ); ?></span>
220+
</div>
221+
208222
<div class="current-user">
209223
<span><?php esc_html_e( 'Paying as customer: ', 'woocommerce-pos' ); ?></span>
210224
<?php $woocommerce_pos_customer = wp_get_current_user(); ?>

woocommerce-pos.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce POS
44
* Plugin URI: https://wordpress.org/plugins/woocommerce-pos/
55
* Description: A simple front-end for taking WooCommerce orders at the Point of Sale. Requires <a href="http://wordpress.org/plugins/woocommerce/">WooCommerce</a>.
6-
* Version: 1.0.0-rc.1
6+
* Version: 1.0.0
77
* Author: kilbot
88
* Author URI: http://wcpos.com
99
* Text Domain: woocommerce-pos
@@ -23,7 +23,7 @@
2323
use Dotenv\Dotenv;
2424

2525
// Define plugin constants.
26-
const VERSION = '1.0.0-rc.1';
26+
const VERSION = '1.0.0';
2727
const PLUGIN_NAME = 'woocommerce-pos';
2828
const SHORT_NAME = 'wcpos';
2929
\define( __NAMESPACE__ . '\PLUGIN_FILE', plugin_basename( __FILE__ ) ); // 'woocommerce-pos/woocommerce-pos.php'

0 commit comments

Comments
 (0)