Changeset 3321453
- Timestamp:
- 07/02/2025 08:59:54 PM (9 months ago)
- Location:
- connect-plus-for-woocommerce
- Files:
-
- 38 added
- 7 edited
-
tags/1.0.24 (added)
-
tags/1.0.24/README.txt (added)
-
tags/1.0.24/admin (added)
-
tags/1.0.24/admin/cpfw-connect-admin.php (added)
-
tags/1.0.24/admin/css (added)
-
tags/1.0.24/admin/css/cpfw-connect-admin.css (added)
-
tags/1.0.24/admin/index.php (added)
-
tags/1.0.24/admin/js (added)
-
tags/1.0.24/admin/js/cpfw-connect-admin.js (added)
-
tags/1.0.24/admin/partials (added)
-
tags/1.0.24/admin/partials/cpfw-connect-admin-send-btn.php (added)
-
tags/1.0.24/admin/views (added)
-
tags/1.0.24/admin/views/cpfw-connect-admin-settings.php (added)
-
tags/1.0.24/connect-plus-for-woocommerce.php (added)
-
tags/1.0.24/endpoints (added)
-
tags/1.0.24/endpoints/cpfw-connect-ajax-wrapper.php (added)
-
tags/1.0.24/endpoints/cpfw-connect-endpoints.php (added)
-
tags/1.0.24/endpoints/index.php (added)
-
tags/1.0.24/includes (added)
-
tags/1.0.24/includes/cpfw-connect-loader.php (added)
-
tags/1.0.24/includes/cpfw-connect-toggler.php (added)
-
tags/1.0.24/includes/cpfw-connect.php (added)
-
tags/1.0.24/includes/index.php (added)
-
tags/1.0.24/includes/services (added)
-
tags/1.0.24/includes/services/cpfw-connect-api.php (added)
-
tags/1.0.24/index.php (added)
-
tags/1.0.24/languages (added)
-
tags/1.0.24/languages/connect-plus-for-woocommerce.pot (added)
-
tags/1.0.24/public (added)
-
tags/1.0.24/public/cpfw-connect-public.php (added)
-
tags/1.0.24/public/css (added)
-
tags/1.0.24/public/css/cpfw-public.css (added)
-
tags/1.0.24/public/index.php (added)
-
tags/1.0.24/public/js (added)
-
tags/1.0.24/public/js/cpfw-public.js (added)
-
tags/1.0.24/public/partials (added)
-
tags/1.0.24/public/partials/cpfw-public-display.php (added)
-
tags/1.0.24/uninstall.php (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/admin/cpfw-connect-admin.php (modified) (1 diff)
-
trunk/admin/css/cpfw-connect-admin.css (modified) (1 diff)
-
trunk/admin/views/cpfw-connect-admin-settings.php (modified) (4 diffs)
-
trunk/connect-plus-for-woocommerce.php (modified) (2 diffs)
-
trunk/includes/services/cpfw-connect-api.php (modified) (1 diff)
-
trunk/languages/connect-plus-for-woocommerce.pot (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
connect-plus-for-woocommerce/trunk/README.txt
r3300805 r3321453 9 9 Tested up to: 6.8 10 10 11 Stable tag: 1.0.2 311 Stable tag: 1.0.24 12 12 13 13 Requires PHP: 7.0 -
connect-plus-for-woocommerce/trunk/admin/cpfw-connect-admin.php
r3300644 r3321453 269 269 'sanitize_callback' => 'absint', 270 270 'default' => 1, 271 ]); 272 273 register_setting('olivery_options_group', 'olivery_connect_paid_methods', [ 274 'type' => 'array', 275 'sanitize_callback' => function ($input) { 276 return array_map('sanitize_text_field', $input); 277 }, 278 ]); 279 280 register_setting('olivery_options_group', 'olivery_connect_paid_methods', [ 281 'sanitize_callback' => function($input) { 282 return is_array($input) ? array_map('sanitize_text_field', $input) : []; 283 }, 271 284 ]); 272 285 -
connect-plus-for-woocommerce/trunk/admin/css/cpfw-connect-admin.css
r3163352 r3321453 72 72 max-width: inherit; 73 73 } 74 /* Shared wrapper grid layout */ 75 .cpfw-grid-wrapper { 76 display: grid; 77 grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 78 gap: 10px; 79 margin-top: 10px; 80 max-width: 600px; 81 } 82 83 /* Shared item box style */ 84 .cpfw-option-box { 85 background: #fff; 86 border: 1px solid #ccd0d4; 87 padding: 8px 12px; 88 border-radius: 4px; 89 box-shadow: 0 1px 2px rgba(0,0,0,0.03); 90 display: flex; 91 align-items: center; 92 font-size: 14px; 93 } 94 95 /* Input inside each item */ 96 .cpfw-option-box input { 97 margin-right: 8px; 98 } 99 100 .description{ 101 margin-top: 10px; 102 } -
connect-plus-for-woocommerce/trunk/admin/views/cpfw-connect-admin-settings.php
r3300805 r3321453 53 53 "Completed Returned" => __("Completed Returned", 'connect-plus-for-woocommerce'), 54 54 ]; 55 56 $available_gateways = WC()->payment_gateways->get_available_payment_gateways(); 57 $current_paid_methods = get_option('olivery_connect_paid_methods', []); 58 55 59 ?> 56 60 … … 111 115 </th> 112 116 <td> 113 < fieldset>114 <label for="olivery_add_connect_sequence_note">117 <div class="cpfw-grid-wrapper"> 118 <label class="cpfw-option-box" for="olivery_add_connect_sequence_note"> 115 119 <input type="checkbox" id="olivery_add_connect_sequence_note" name="olivery_add_connect_sequence_note" 116 120 value="1" <?php checked(get_option('olivery_add_connect_sequence_note', 1), 1); ?>> 117 <?php esc_html_e('Add Connect plus Sequence', 'connect-plus-for-woocommerce'); ?> 118 </label> 119 <br> 120 <label for="olivery_add_delivery_sequence_note"> 121 <?php esc_html_e('Add Connect Plus Sequence', 'connect-plus-for-woocommerce'); ?> 122 </label> 123 <label class="cpfw-option-box" for="olivery_add_delivery_sequence_note"> 121 124 <input type="checkbox" id="olivery_add_delivery_sequence_note" name="olivery_add_delivery_sequence_note" 122 125 value="1" <?php checked(get_option('olivery_add_delivery_sequence_note', 1), 1); ?>> 123 126 <?php esc_html_e('Add Delivery Sequence', 'connect-plus-for-woocommerce'); ?> 124 127 </label> 125 </ fieldset>128 </div> 126 129 <p class="description"> 127 130 <?php esc_html_e('Choose which sequences should be added to order notes.', 'connect-plus-for-woocommerce'); ?> … … 132 135 </div> 133 136 137 <div class="connect-plus-settings-section"> 138 <table class="form-table"> 139 <tr> 140 <th scope="row"> 141 <label><?php esc_html_e('Paid Payment Methods:', 'connect-plus-for-woocommerce'); ?></label> 142 </th> 143 <td> 144 <div class="cpfw-grid-wrapper"> 145 <?php foreach ($available_gateways as $gateway_id => $gateway): ?> 146 <label class="cpfw-option-box"> 147 <input type="checkbox" name="olivery_connect_paid_methods[]" 148 value="<?php echo esc_attr($gateway_id); ?>" 149 <?php checked(in_array($gateway_id, (array) $current_paid_methods)); ?>> 150 <?php echo esc_html($gateway->get_title()); ?> 151 </label> 152 <?php endforeach; ?> 153 154 <label class="cpfw-option-box"> 155 <input type="checkbox" name="olivery_connect_paid_methods[]" 156 value="N/A" <?php checked(in_array('N/A', (array) $current_paid_methods)); ?>> 157 <?php esc_html_e('N/A', 'connect-plus-for-woocommerce'); ?> 158 </label> 159 160 <label class="cpfw-option-box"> 161 <input type="checkbox" name="olivery_connect_paid_methods[]" 162 value="Other" <?php checked(in_array('Other', (array) $current_paid_methods)); ?>> 163 <?php esc_html_e('Other', 'connect-plus-for-woocommerce'); ?> 164 </label> 165 </div> 166 <p class="description" style="margin-top: 10px;"> 167 <?php esc_html_e('Select all payment methods that you want to consider as paid when sending orders to Connect Plus.', 'connect-plus-for-woocommerce'); ?> 168 </p> 169 </td> 170 </tr> 171 </table> 172 </div> 173 134 174 <div class="connect-plus-settings-section"> 135 175 <h2><?php esc_html_e('Delviery Status Mapping', 'connect-plus-for-woocommerce'); ?></h2> … … 165 205 </table> 166 206 </div> 207 167 208 <?php submit_button(__('Save Settings', 'connect-plus-for-woocommerce')); ?> 168 209 </form> -
connect-plus-for-woocommerce/trunk/connect-plus-for-woocommerce.php
r3300805 r3321453 17 17 * Plugin URI: https://website.olivery.app/ 18 18 * Description: Plugin to help you connect WooCommerce with Connect Plus application 19 * Version: 1.0.2 319 * Version: 1.0.24 20 20 * Author: Olivery dev 21 21 * Text Domain: connect-plus-for-woocommerce … … 40 40 define('CPFW_PLUGIN_DIR', __DIR__); 41 41 42 define('PLUGIN_VERSION','1.0.2 3');42 define('PLUGIN_VERSION','1.0.24'); 43 43 /** 44 44 * The code that runs during plugin activation. -
connect-plus-for-woocommerce/trunk/includes/services/cpfw-connect-api.php
r3277959 r3321453 145 145 // for paid 146 146 $cpfw_is_paid = false; 147 $cpfw_payment_method = $cpfw_the_order->get_payment_method(); 148 $cpfw_payment_method_title = $cpfw_the_order->get_payment_method_title(); 149 if (strpos($cpfw_payment_method, "montypay_payment_gateway") !== false ) { 147 $cpfw_payment_method = strtolower(trim($cpfw_the_order->get_payment_method())); // slug 148 $cpfw_payment_method_title = strtolower(trim($cpfw_the_order->get_payment_method_title())); //title 149 $paid_methods = get_option('olivery_connect_paid_methods', []); 150 $paid_methods_lower = array_map('strtolower', $paid_methods); 151 152 // 1. Special handling for MontyPay 153 if (strpos($cpfw_payment_method, 'montypay_payment_gateway') !== false) { 150 154 $cpfw_is_paid = true; 155 // 2. If both slug and title are empty (possible N/A) 156 } elseif ($cpfw_payment_method === '' && $cpfw_payment_method_title === '') { 157 if (in_array('n/a', $paid_methods_lower, true)) { 158 $cpfw_is_paid = true; 159 } 160 // 3. Exact match by slug 161 } elseif (in_array($cpfw_payment_method, $paid_methods_lower, true)) { 162 $cpfw_is_paid = true; 163 // 4. Exact match by title 164 } elseif (in_array($cpfw_payment_method_title, $paid_methods_lower, true)) { 165 $cpfw_is_paid = true; 166 // 5. Loose title match 167 } else { 168 foreach ($paid_methods_lower as $method_slug_or_title) { 169 if (strpos($cpfw_payment_method_title, $method_slug_or_title) !== false) { 170 $cpfw_is_paid = true; 171 break; 172 } 173 } 151 174 } 152 175 -
connect-plus-for-woocommerce/trunk/languages/connect-plus-for-woocommerce.pot
r3300805 r3321453 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Connect Plus for WooCommerce 1.0.2 3\n"5 "Project-Id-Version: Connect Plus for WooCommerce 1.0.24\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/connect-plus-for-woocommerce\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
Note: See TracChangeset
for help on using the changeset viewer.