Plugin Directory

Changeset 3495198


Ignore:
Timestamp:
03/31/2026 06:35:35 AM (6 days ago)
Author:
olivery
Message:

support order number as order reference

Location:
connect-plus-for-woocommerce
Files:
40 added
7 edited

Legend:

Unmodified
Added
Removed
  • connect-plus-for-woocommerce/trunk/README.txt

    r3456541 r3495198  
    99Tested up to: 6.9
    1010
    11 Stable tag: 1.0.29
     11Stable tag: 1.0.30
    1212
    1313Requires PHP: 7.0
  • connect-plus-for-woocommerce/trunk/admin/cpfw-connect-admin.php

    r3456541 r3495198  
    285285                return is_array($input) ? array_map('sanitize_text_field', $input) : [];
    286286            },
     287        ]);
     288
     289        register_setting('olivery_options_group', 'olivery_connect_use_order_number', [
     290            'type' => 'integer',
     291            'sanitize_callback' => 'absint',
     292            'default' => 0,
    287293        ]);
    288294       
  • connect-plus-for-woocommerce/trunk/admin/views/cpfw-connect-admin-settings.php

    r3456541 r3495198  
    148148                            <p class="description">
    149149                                <?php esc_html_e('Orders will be automatically sent to Connect Plus when they reach this status.', 'connect-plus-for-woocommerce'); ?>
     150                            </p>
     151                        </td>
     152                    </tr>
     153                    <tr>
     154                        <th scope="row">
     155                            <label for="olivery_connect_use_order_number">
     156                                <?php esc_html_e('Order Reference Field:', 'connect-plus-for-woocommerce'); ?>
     157                            </label>
     158                        </th>
     159                        <td>
     160                            <label class="cpfw-option-box" for="olivery_connect_use_order_number">
     161                                <input type="checkbox" id="olivery_connect_use_order_number" name="olivery_connect_use_order_number"
     162                                    value="1" <?php checked(get_option('olivery_connect_use_order_number', 0), 1); ?>>
     163                                <?php esc_html_e('Use Order Number instead of Order ID', 'connect-plus-for-woocommerce'); ?>
     164                            </label>
     165                            <p class="description">
     166                                <?php esc_html_e('When enabled, the order number (which may differ from the internal ID if using sequential order number plugins) will be sent as the order reference to Connect Plus.', 'connect-plus-for-woocommerce'); ?>
    150167                            </p>
    151168                        </td>
  • connect-plus-for-woocommerce/trunk/connect-plus-for-woocommerce.php

    r3456541 r3495198  
    1717 * Plugin URI:        https://website.olivery.app/
    1818 * Description:       Plugin to help you connect WooCommerce with Connect Plus application
    19  * Version:           1.0.29
     19 * Version:           1.0.30
    2020 * Author:            Olivery dev
    2121 * Text Domain:       connect-plus-for-woocommerce
     
    5555define('CPFW_PLUGIN_DIR', __DIR__);
    5656
    57 define('PLUGIN_VERSION','1.0.29');
     57define('PLUGIN_VERSION','1.0.30');
    5858/**
    5959 * The code that runs during plugin activation.
  • connect-plus-for-woocommerce/trunk/includes/services/cpfw-connect-api.php

    r3401191 r3495198  
    257257                    "country_code": "",
    258258                    "note": '.wp_json_encode($cpfw_the_order->get_customer_note()?:'', JSON_UNESCAPED_UNICODE).',
    259                     "order_reference": "' . $cpfw_the_order->get_id() . '",
     259                    "order_reference": "' . ((get_option('olivery_connect_use_order_number', 0) && method_exists($cpfw_the_order, 'get_order_number')) ? $cpfw_the_order->get_order_number() : $cpfw_the_order->get_id()) . '",
     260                    "ecommerce_order_id": "' . $cpfw_the_order->get_id() . '",
    260261                    "product_info": ' . wp_json_encode($cpfw_products_detail?:'', JSON_UNESCAPED_UNICODE). ',
    261262                    "package_cost": ' . $cpfw_the_order->get_subtotal() . ',
  • connect-plus-for-woocommerce/trunk/languages/connect-plus-for-woocommerce-ar.po

    r3456541 r3495198  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Connect Plus for WooCommerce 1.0.29\n"
     5"Project-Id-Version: Connect Plus for WooCommerce 1.0.30\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/connect-plus-for-"
    77"woocommerce\n"
  • connect-plus-for-woocommerce/trunk/languages/connect-plus-for-woocommerce.pot

    r3456541 r3495198  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Connect Plus for WooCommerce 1.0.29\n"
     5"Project-Id-Version: Connect Plus for WooCommerce 1.0.30\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/connect-plus-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
Note: See TracChangeset for help on using the changeset viewer.