PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.26
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.26
1.10.27 1.10.26 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 All 171 releases
← All changes | includes/API/V1/Payment_Gateways.php +14 -0 1.10.21 → 1.10.26 View file →
@@ -131,8 +131,16 @@
131 131 'capabilities' => $this->gateway_contract->get_capabilities( $item, $request ),
132 132 'provider_data' => $this->gateway_contract->get_provider_data( $item, $request ),
133 133 );
134 134
135 + // The status the merchant configured this gateway to settle a POS sale to,
136 + // so the app can recognise a configured outcome WooCommerce does not call
137 + // paid (Pending payment for a "pay by invoice" flow, On hold for a bank
138 + // transfer). Null when the merchant has not stored one: the app must not
139 + // treat an unpaid status as settled on a guess.
140 + $settled_status = $this->gateway_contract->get_settled_order_status( $item->id );
141 + $data['settled_order_status'] = '' === $settled_status ? null : $settled_status;
142 +
135 143 $context = ! empty( $request['context'] ) ? $request['context'] : 'view';
136 144 $data = $this->add_additional_fields_to_object( $data, $request );
137 145 $data = $this->filter_response_by_context( $data, $context );
138 146
@@ -212,8 +220,14 @@
212 220 ),
213 221 'provider_data' => array(
214 222 'description' => __( 'Provider-specific public metadata.', 'woocommerce-pos' ),
215 223 'type' => 'object',
224 + 'context' => array( 'view' ),
225 + 'readonly' => true,
226 + ),
227 + 'settled_order_status' => array(
228 + 'description' => __( 'Order status (without the wc- prefix) the merchant configured this gateway to settle a POS sale to, or null when none is stored.', 'woocommerce-pos' ),
229 + 'type' => array( 'string', 'null' ),
216 230 'context' => array( 'view' ),
217 231 'readonly' => true,
218 232 ),
219 233 ),