PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.17
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.17
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
← All changes | includes/API/V2/Proxy/Scoped_Proxy_Behavior.php +0 -13 1.10.22 → 1.10.17 View file →
@@ -6,9 +6,8 @@
6 6 */
7 7
8 8 namespace WCPOS\WooCommercePOS\API\V2\Proxy;
9 9
10 -use WCPOS\WooCommercePOS\Services\Permission_Rules;
11 10 use WP_REST_Request;
12 11
13 12 /**
14 13 * Gives every resource the same install/run/finally/unwind discipline.
@@ -13,14 +12,8 @@
13 12 /**
14 13 * Gives every resource the same install/run/finally/unwind discipline.
15 14 */
16 15 abstract class Scoped_Proxy_Behavior implements Proxy_Behavior {
17 - /** Permission collection, when this resource has a POS-tier read grant.
18 - *
19 - * @var string|null
20 - */
21 - protected $permission_collection;
22 -
23 16 /**
24 17 * Forward every param untouched.
25 18 *
26 19 * @param array $params Query parameters to forward.
@@ -40,18 +33,12 @@
40 33 * @return mixed
41 34 */
42 35 public function around( callable $forward ) {
43 36 $bindings = $this->install();
44 - if ( $this->permission_collection ) {
45 - Permission_Rules::install_wc_filter( $this->permission_collection );
46 - }
47 37
48 38 try {
49 39 return $this->run( $forward );
50 40 } finally {
51 - if ( $this->permission_collection ) {
52 - Permission_Rules::uninstall_wc_filter();
53 - }
54 41 foreach ( array_reverse( $bindings ) as $binding ) {
55 42 remove_filter( $binding[0], $binding[1], $binding[2] );
56 43 }
57 44 }