PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Modules/PaymentMethods/Core/AbstractPaymentGateway.php +11 -2 1.6.2 → 1.6.5 View file →
@@ -67,10 +67,18 @@
67 67 if (isset($gatewaySettings['checkout_logo']) && !empty($gatewaySettings['checkout_logo'])) {
68 68 $meta['logo'] = $gatewaySettings['checkout_logo'];
69 69 }
70 70
71 - if (isset($gatewaySettings['checkout_instructions']) && !empty($gatewaySettings['checkout_instructions'])) {
72 - $meta['instructions'] = $gatewaySettings['checkout_instructions'];
71 + if (!empty($gatewaySettings['checkout_instructions'])) {
72 + $instructionsText = trim(wp_strip_all_tags(html_entity_decode($gatewaySettings['checkout_instructions'], ENT_QUOTES)));
73 + // Nbsp survives strip_tags/html_entity_decode as a literal
74 + // non-breaking space, so a rich-text editor can save "<p>&nbsp;</p>"
75 + // and still look non-empty to a bare !empty() check.
76 + $instructionsText = str_replace("\xC2\xA0", '', $instructionsText);
77 +
78 + if (trim($instructionsText) !== '') {
79 + $meta['instructions'] = $gatewaySettings['checkout_instructions'];
80 + }
73 81 }
74 82
75 83 if ($key !== '') {
76 84 return Arr::get($meta, $key, '');
@@ -317,8 +325,9 @@
317 325 if ($oldGateway && $oldGateway->has('subscriptions') && $oldGateway->subscriptions) {
318 326 $cancelResult = $oldGateway->subscriptions->cancel($subscription->vendor_subscription_id, [
319 327 'subscription_id' => $subscription->id,
320 328 'parent_order_id' => $subscription->parent_order_id,
329 + 'mode' => $subscription->order ? $subscription->order->mode : 'current',
321 330 ]);
322 331 if (is_wp_error($cancelResult)) {
323 332 fluent_cart_error_log(
324 333 'Failed to cancel vendor subscription during conversion to manual',