Plugin Directory

Changeset 3282033


Ignore:
Timestamp:
04/25/2025 05:04:17 PM (11 months ago)
Author:
sjcope
Message:

extend phone number

Location:
sell-on-consignment
Files:
30 added
6 edited

Legend:

Unmodified
Added
Removed
  • sell-on-consignment/trunk/README.txt

    r3274994 r3282033  
    33Tags: consignment, sell products on consignment
    44Tested up to: 6.8
    5 Stable tag: 1.2
     5Stable tag: 1.3
    66License: GPLv2
    77License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848== Changelog ==
    4949
     50= 1.3 =
     51Extend length of phone field from 10 to 20
     52
    5053= 1.2 =
    5154Fix nonce
     
    5962== Upgrade Notice ==
    6063
     64= 1.3 =
     65Extend length of phone field from 10 to 20. Upgrade when possible. You may have to deactivate and reactivate to have the change take effect.
     66
    6167= 1.2 =
    6268Fixes form submission. Upgrade as soon as possible.
  • sell-on-consignment/trunk/admin/class-cwsoc-sell-admin.php

    r3274983 r3282033  
    465465    }
    466466    $query = $wpdb->insert( $wpdb->prefix.'cwsoc_sell_store', array( 'email' => sanitize_email($values['email']), 'first_name' => sanitize_text_field($values['first_name']), 'last_name' => sanitize_text_field($values['last_name']), 'company' => sanitize_text_field($values['company']),'address_1'=>sanitize_text_field($values['address_1']), 'address_2' => sanitize_text_field($values['address_2']), 'city' => sanitize_text_field($values['city']), 'state' => sanitize_text_field($values['state']), 'country' => sanitize_text_field($values['country']), 'postcode' => sanitize_text_field($values['postcode']), 'phone' => sanitize_text_field($values['phone']) ), array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery
    467     if ($wpdb->insert_id < 0) {
     467    if (isset($wpdb->last_error) && $wpdb->last_error!="") {
    468468        $results = array("status"=>0, "message"=>'Could not add new store. Error is '.$wpdb->last_error.'. ');
    469469    } else {
  • sell-on-consignment/trunk/admin/partials/cwsoc-sell-admin-display.php

    r3254349 r3282033  
    7979                        <input type="email" maxlength="150" required name="email"/>
    8080                    </td><td>
    81                         <label for="phone">Numbers only</label>
    82                         <input type="number" maxlength="10" required name="phone"/>
     81                        <label for="phone">Numbers only. Maximum 20.</label>
     82                        <input type="text" maxlength="20" pattern="\d*" required name="phone"/>
    8383                    </td><td>
    8484                        <button type="submit">Add</button>
     
    173173                           
    174174                        </td><td>
    175                             <label>Numbers only</label>
    176                             <input type="number" maxlength=10 required name="phone" value="'.esc_html($row->phone).'"/>
     175                            <label>Numbers only. Maximum 20.</label>
     176                            <input type="text" maxlength="20" pattern="\d*" required name="phone" value="'.esc_html($row->phone).'"/>
    177177                        </td>
    178178                        <td align="center">
  • sell-on-consignment/trunk/includes/class-cwsoc-sell-activator.php

    r3274983 r3282033  
    4242            company varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    4343            email varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    44             phone varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
     44            phone varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    4545            address_1 varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    4646            address_2 varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
     
    5454        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    5555        dbDelta($sql);
    56                
     56       
     57        // ALTER PHONE COLUMN IN CASE THEY ALREADY HAD INSTALLED
     58        $column_name = "phone";
     59        $alter_ddl = "ALTER TABLE $table_name MODIFY $column_name VARCHAR(20)";
     60        dbDelta($alter_ddl);
     61
    5762        // SETTINGS table
    5863        $table_name = $wpdb->prefix . "cwsoc_sell_settings";
  • sell-on-consignment/trunk/includes/class-cwsoc-sell.php

    r3274994 r3282033  
    6363            $this->version = CWSOC_SELL_VERSION;
    6464        } else {
    65             $this->version = '1.2';
     65            $this->version = '1.3';
    6666        }
    6767        $this->plugin_name = 'sell-on-consignment';
  • sell-on-consignment/trunk/sell-on-consignment.php

    r3274994 r3282033  
    1616 Plugin Name:       Sell On Consignment
    1717 Description:       Sell a product on both your website and on consignment at another store.
    18  Version:           1.2
     18 Version:           1.3
    1919 Author:            Charlene's Web Services
    2020 Author URI:        https://charlenesweb.ca/
     
    3333 * First release 1.0.0 and then using SemVer - https://semver.org X.Y.Z (Major.Minor.Patch)
    3434 */
    35 define( 'CWSOC_SELL_VERSION', '1.2' );
     35define( 'CWSOC_SELL_VERSION', '1.3' );
    3636define('CWSOC_SELL_SRC_DIR', dirname(__FILE__) );
    3737/**
Note: See TracChangeset for help on using the changeset viewer.