Commit 953cdab
committed
fix: move MONEI_MAIN_FILE constant to bootstrap file and fix type hints
1. The MONEI_MAIN_FILE constant was defined in class-woocommerce-gateway-monei.php
(__FILE__) but WordPress only fires plugin_action_links_{plugin} filter for
the actual plugin bootstrap file (woocommerce-gateway-monei.php). This caused
the Settings link to never appear in the WordPress plugins list.
Fixed by defining MONEI_MAIN_FILE in woocommerce-gateway-monei.php before
including the class file, so it correctly points to the plugin bootstrap.
2. Fixed PHPStan errors in MoneiAppleGoogleBlocksSupport by changing gateway
property type from abstract WCMoneiPaymentGateway to concrete
WCGatewayMoneiAppleGoogle class. This allows PHPStan to recognize the
isGoogleAvailable() and isAppleAvailable() methods.
Fixes Settings link visibility in WordPress admin.1 parent 26b9a35 commit 953cdab
File tree
3 files changed
+7
-10
lines changed- src/Gateways/Blocks
3 files changed
+7
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
46 | | - | |
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
| |||
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
91 | | - | |
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
| |||
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
123 | | - | |
124 | 118 | | |
125 | 119 | | |
126 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
0 commit comments