Plugin Directory

Changeset 2765435


Ignore:
Timestamp:
08/03/2022 12:44:35 AM (3 years ago)
Author:
foosales
Message:

Release 1.28.1

Location:
foosales
Files:
359 added
19 edited

Legend:

Unmodified
Added
Removed
  • foosales/trunk/class-foosales-config.php

    r2755210 r2765435  
    7878    public function __construct() {
    7979
    80         $this->plugin_version = '1.28.0';
     80        $this->plugin_version = '1.28.1';
    8181        $this->class_path     = plugin_dir_path( __FILE__ ) . 'classes/';
    8282        $this->helper_path    = plugin_dir_path( __FILE__ ) . 'helpers/';
  • foosales/trunk/classes/class-foosales.php

    r2755210 r2765435  
    8686        add_action( 'woocommerce_admin_order_data_after_order_details', array( $this, 'fsfwc_order_meta_general' ) );
    8787        add_action( 'save_post', array( $this, 'fsfwc_order_meta_save_cashier' ) );
     88        add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'fsfwc_update_order_meta' ) );
    8889
    8990        add_filter( 'woocommerce_available_payment_gateways', array( $this, 'fsfwc_conditional_payment_gateways' ), 10, 1 );
     
    15891590
    15901591    /**
     1592     * Store meta to identify the order as an online order.
     1593     *
     1594     * @since 1.28.0
     1595     * @param string $order_id The ID of the order being  created at checkout.
     1596     */
     1597    public function fsfwc_update_order_meta( $order_id ) {
     1598
     1599        update_post_meta( $order_id, '_foosales_order_source', 'online' );
     1600
     1601    }
     1602
     1603    /**
    15911604     * Filter callback to output the current plugin version in the API helper file.
    15921605     *
  • foosales/trunk/foosales.php

    r2755210 r2765435  
    33 * Plugin Name: FooSales — Point of Sale (POS) for WooCommerce
    44 * Description: FooSales POS is a point of sale (POS) system for WooCommerce that turns any computer, iPad or Android tablet into a physical retail platform. FooSales POS apps connect to your WooCommerce store using the FooSales POS plugin and make it possible to sell your products in person while accepting payments using Square hardware and the Square point of sale (Square POS) app.
    5  * Version: 1.28.0
     5 * Version: 1.28.1
    66 * Author: FooSales
    77 * Author URI: https://www.foosales.com
     
    1212 *
    1313 * WC requires at least: 5.0.0
    14  * WC tested up to: 6.6.1
     14 * WC tested up to: 6.7.0
    1515 *
    1616 * Copyright: 2009-2022 Grenade Technologies.
  • foosales/trunk/helpers/foosales-api-helper.php

    r2755210 r2765435  
    510510    if ( 'yes' === (string) get_option( 'globalFooSalesProductsOnlyInStock', '' ) ) {
    511511        $args['meta_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery
    512             'key'   => '_stock_status',
    513             'value' => 'instock',
    514         );
    515 
    516         $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery
    517             'key'   => '_backorders',
    518             'value' => 'no',
     512            array(
     513                'key'   => '_stock_status',
     514                'value' => 'instock',
     515            ),
     516            array(
     517                'key'   => '_backorders',
     518                'value' => 'no',
     519            ),
    519520        );
    520521    }
  • foosales/trunk/readme.txt

    r2755210 r2765435  
    33Tags: point of sale, pos, woocommerce point of sale, woocommerce pos, woocommerce square, woocommerce stripe
    44Requires at least: 5.1
    5 Tested up to: 6.0.0
    6 Stable tag: 1.28.0
     5Tested up to: 6.0.1
     6Stable tag: 1.28.1
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    221221
    222222== Changelog ==
     223
     2242022-08-03 - version 1.28.1
     225* Point of sale plugin fix: Minor bug fix for when enabling the setting to only load in stock products
    223226
    2242272022-07-12 - version 1.28.0
  • foosales/trunk/vendor/stripe-php/lib/Account.php

    r2708162 r2765435  
    9191    }
    9292
     93    /**
     94     * @param null|array|string $id the ID of the account to retrieve, or an
     95     *     options array containing an `id` key
     96     * @param null|array|string $opts
     97     *
     98     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
     99     *
     100     * @return \FooSales\Stripe\Account
     101     */
     102    public static function retrieve($id = null, $opts = null)
     103    {
     104        if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) {
     105            $opts = $id;
     106            $id = null;
     107        }
     108
     109        return self::_retrieve($id, $opts);
     110    }
     111
    93112    public function serializeParameters($force = false)
    94113    {
     
    143162
    144163    /**
    145      * @param null|array|string $id the ID of the account to retrieve, or an
    146      *     options array containing an `id` key
    147      * @param null|array|string $opts
    148      *
    149      * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
    150      *
    151      * @return \FooSales\Stripe\Account
    152      */
    153     public static function retrieve($id = null, $opts = null)
    154     {
    155         if (!$opts && \is_string($id) && 'sk_' === \substr($id, 0, 3)) {
    156             $opts = $id;
    157             $id = null;
    158         }
    159 
    160         return self::_retrieve($id, $opts);
    161     }
    162 
    163     /**
    164164     * @param null|array $clientId
    165165     * @param null|array|string $opts
     
    214214    }
    215215
    216     /*
    217      * Capabilities methods
    218      * We can not add the capabilities() method today as the Account object already has a
    219      * capabilities property which is a hash and not the sub-list of capabilities.
    220      */
    221 
    222216    const PATH_CAPABILITIES = '/capabilities';
    223217
  • foosales/trunk/vendor/stripe-php/lib/Customer.php

    r2755210 r2765435  
    2020 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
    2121 * @property null|string $currency Three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> the customer can be charged in for recurring billing purposes.
     22 * @property null|string $default_currency The default three-letter <a href="https://stripe.com/docs/currencies">ISO code for the currency</a> that the customer will be charged in for billing purposes.
    2223 * @property null|string|\FooSales\Stripe\Account|\FooSales\Stripe\AlipayAccount|\FooSales\Stripe\BankAccount|\FooSales\Stripe\BitcoinReceiver|\FooSales\Stripe\Card|\FooSales\Stripe\Source $default_source <p>ID of the default payment source for the customer.</p><p>If you are using payment methods created via the PaymentMethods API, see the <a href="https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method</a> field instead.</p>
    2324 * @property null|bool $delinquent <p>When the customer's latest invoice is billed by charging automatically, <code>delinquent</code> is <code>true</code> if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, <code>delinquent</code> is <code>true</code> if the invoice isn't paid by its due date.</p><p>If an invoice is marked uncollectible by <a href="https://stripe.com/docs/billing/automatic-collection">dunning</a>, <code>delinquent</code> doesn't get reset to <code>false</code>.</p>
     
    2526 * @property null|\FooSales\Stripe\Discount $discount Describes the current discount active on the customer, if there is one.
    2627 * @property null|string $email The customer's email address.
     28 * @property \FooSales\Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
    2729 * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers.
    2830 * @property \FooSales\Stripe\StripeObject $invoice_settings
  • foosales/trunk/vendor/stripe-php/lib/File.php

    r2687850 r2765435  
    6060    }
    6161
    62     public static function classUrl()
    63     {
    64         return '/v1/files';
    65     }
    66 
    6762    /**
    6863     * @param null|array $params
  • foosales/trunk/vendor/stripe-php/lib/Invoice.php

    r2755210 r2765435  
    114114 * @property null|int $total_excluding_tax The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
    115115 * @property \FooSales\Stripe\StripeObject[] $total_tax_amounts The aggregate amounts calculated per tax rate for all line items.
     116 * @property null|\FooSales\Stripe\StripeObject $transfer_data The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
    116117 * @property null|int $webhooks_delivered_at Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have <a href="https://stripe.com/docs/billing/webhooks#understand">been exhausted</a>. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
    117118 */
     
    123124    use ApiOperations\Create;
    124125    use ApiOperations\Delete;
     126    use ApiOperations\NestedResource;
    125127    use ApiOperations\Retrieve;
    126128    use ApiOperations\Search;
     
    130132    const BILLING_SEND_INVOICE = 'send_invoice';
    131133
     134    const BILLING_REASON_AUTOMATIC_PENDING_INVOICE_ITEM_INVOICE = 'automatic_pending_invoice_item_invoice';
    132135    const BILLING_REASON_MANUAL = 'manual';
    133136    const BILLING_REASON_QUOTE_ACCEPT = 'quote_accept';
     
    149152    const STATUS_VOID = 'void';
    150153
    151     use ApiOperations\NestedResource;
    152 
    153     const PATH_LINES = '/lines';
    154 
    155     /**
    156      * @param string $id the ID of the invoice on which to retrieve the lines
    157      * @param null|array $params
    158      * @param null|array|string $opts
    159      *
    160      * @throws StripeExceptionApiErrorException if the request fails
    161      *
    162      * @return \FooSales\Stripe\Collection<\FooSales\Stripe\InvoiceLineItem> the list of lines (InvoiceLineItem)
    163      */
    164     public static function allLines($id, $params = null, $opts = null)
    165     {
    166         return self::_allNestedResources($id, static::PATH_LINES, $params, $opts);
    167     }
    168 
    169154    /**
    170155     * @param null|array $params
     
    259244     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
    260245     *
     246     * @return \FooSales\Stripe\Collection<\FooSales\Stripe\InvoiceLineItem> list of InvoiceLineItems
     247     */
     248    public static function upcomingLines($params = null, $opts = null)
     249    {
     250        $url = static::classUrl() . '/upcoming/lines';
     251        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
     252        $obj = \FooSales\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
     253        $obj->setLastResponse($response);
     254
     255        return $obj;
     256    }
     257
     258    /**
     259     * @param null|array $params
     260     * @param null|array|string $opts
     261     *
     262     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
     263     *
    261264     * @return \FooSales\Stripe\Invoice the voided invoice
    262265     */
     
    284287        return self::_searchResource($url, $params, $opts);
    285288    }
     289
     290    const PATH_LINES = '/lines';
     291
     292    /**
     293     * @param string $id the ID of the invoice on which to retrieve the line items
     294     * @param null|array $params
     295     * @param null|array|string $opts
     296     *
     297     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
     298     *
     299     * @return \FooSales\Stripe\Collection<\FooSales\Stripe\LineItem> the list of line items
     300     */
     301    public static function allLines($id, $params = null, $opts = null)
     302    {
     303        return self::_allNestedResources($id, static::PATH_LINES, $params, $opts);
     304    }
    286305}
  • foosales/trunk/vendor/stripe-php/lib/Issuing/Card.php

    r2738176 r2765435  
    1515 * @property \FooSales\Stripe\Issuing\Cardholder $cardholder <p>An Issuing <code>Cardholder</code> object represents an individual or business entity who is <a href="https://stripe.com/docs/issuing">issued</a> cards.</p><p>Related guide: <a href="https://stripe.com/docs/issuing/cards#create-cardholder">How to create a Cardholder</a></p>
    1616 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
    17  * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
     17 * @property string $currency Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase. Supported currencies are <code>usd</code> in the US, <code>eur</code> in the EU, and <code>gbp</code> in the UK.
    1818 * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with <a href="https://stripe.com/docs/api/expanding_objects">the <code>expand</code> parameter</a>. Additionally, it's only available via the <a href="https://stripe.com/docs/api/issuing/cards/retrieve">&quot;Retrieve a card&quot; endpoint</a>, not via &quot;List all cards&quot; or any other endpoint.
    1919 * @property int $exp_month The expiration month of the card.
  • foosales/trunk/vendor/stripe-php/lib/PaymentMethod.php

    r2755210 r2765435  
    2727 * @property \FooSales\Stripe\StripeObject $bancontact
    2828 * @property \FooSales\Stripe\StripeObject $billing_details
     29 * @property \FooSales\Stripe\StripeObject $blik
    2930 * @property \FooSales\Stripe\StripeObject $boleto
    3031 * @property \FooSales\Stripe\StripeObject $card
  • foosales/trunk/vendor/stripe-php/lib/Payout.php

    r2591658 r2765435  
    5454    const FAILURE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized';
    5555    const FAILURE_DECLINED = 'declined';
     56    const FAILURE_INCORRECT_ACCOUNT_HOLDER_ADDRESS = 'incorrect_account_holder_address';
    5657    const FAILURE_INCORRECT_ACCOUNT_HOLDER_NAME = 'incorrect_account_holder_name';
     58    const FAILURE_INCORRECT_ACCOUNT_HOLDER_TAX_ID = 'incorrect_account_holder_tax_id';
    5759    const FAILURE_INSUFFICIENT_FUNDS = 'insufficient_funds';
    5860    const FAILURE_INVALID_ACCOUNT_NUMBER = 'invalid_account_number';
  • foosales/trunk/vendor/stripe-php/lib/Refund.php

    r2738176 r2765435  
    5353    const STATUS_FAILED = 'failed';
    5454    const STATUS_PENDING = 'pending';
     55    const STATUS_REQUIRES_ACTION = 'requires_action';
    5556    const STATUS_SUCCEEDED = 'succeeded';
    5657
  • foosales/trunk/vendor/stripe-php/lib/Service/PaymentIntentService.php

    r2738176 r2765435  
    2424    /**
    2525     * Manually reconcile the remaining amount for a customer_balance PaymentIntent.
    26      *
    27      * This can be used when the cash balance for <a
    28      * href="docs/payments/customer-balance/reconciliation#cash-manual-reconciliation">a
    29      * customer in manual reconciliation mode</a> received funds.
    3026     *
    3127     * @param string $id
  • foosales/trunk/vendor/stripe-php/lib/Service/SourceService.php

    r2591658 r2765435  
    77class SourceService extends \FooSales\Stripe\Service\AbstractService
    88{
     9    /**
     10     * List source transactions for a given source.
     11     *
     12     * @param string $id
     13     * @param null|array $params
     14     * @param null|array|\FooSales\Stripe\Util\RequestOptions $opts
     15     *
     16     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
     17     *
     18     * @return \FooSales\Stripe\Collection<\FooSales\Stripe\SourceTransaction>
     19     */
     20    public function allSourceTransactions($id, $params = null, $opts = null)
     21    {
     22        return $this->requestCollection('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts);
     23    }
     24
    925    /**
    1026     * @param string $id
  • foosales/trunk/vendor/stripe-php/lib/Source.php

    r2591658 r2765435  
    143143     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
    144144     *
    145      * @return \FooSales\Stripe\Collection the list of source transactions
     145     * @return \FooSales\Stripe\Collection<\FooSales\Stripe\SourceTransaction> list of SourceTransactions
    146146     */
    147147    public static function allSourceTransactions($id, $params = null, $opts = null)
    148148    {
    149         return self::_allNestedResources($id, '/source_transactions', $params, $opts);
     149        $url = static::resourceUrl($id) . '/source_transactions';
     150        list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
     151        $obj = \FooSales\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
     152        $obj->setLastResponse($response);
     153
     154        return $obj;
    150155    }
    151156
  • foosales/trunk/vendor/stripe-php/lib/Stripe.php

    r2755210 r2765435  
    5959    private static $initialNetworkRetryDelay = 0.5;
    6060
    61     const VERSION = '8.10.0';
     61    const VERSION = '8.12.0';
    6262
    6363    /**
  • foosales/trunk/vendor/stripe-php/lib/Subscription.php

    r2755210 r2765435  
    101101     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
    102102     *
    103      * @return \FooSales\Stripe\Subscription the deleted subscription
     103     * @return \FooSales\Stripe\Subscription the updated subscription
    104104     */
    105     public function cancel($params = null, $opts = null)
     105    public function deleteDiscount($params = null, $opts = null)
    106106    {
    107         return $this->_delete($params, $opts);
     107        $url = $this->instanceUrl() . '/discount';
     108        list($response, $opts) = $this->_request('delete', $url, $params, $opts);
     109        $this->refreshFrom(['discount' => null], $opts, true);
     110
     111        return $this;
    108112    }
    109113
     
    114118     * @throws \FooSales\Stripe\Exception\ApiErrorException if the request fails
    115119     *
    116      * @return \FooSales\Stripe\Subscription the updated subscription
     120     * @return \FooSales\Stripe\Subscription the canceled subscription
    117121     */
    118     public function deleteDiscount($params = null, $opts = null)
     122    public function cancel($params = null, $opts = null)
    119123    {
    120         $url = $this->instanceUrl() . '/discount';
     124        $url = $this->instanceUrl();
    121125        list($response, $opts) = $this->_request('delete', $url, $params, $opts);
    122         $this->refreshFrom(['discount' => null], $opts, true);
     126        $this->refreshFrom($response, $opts);
    123127
    124128        return $this;
  • foosales/trunk/vendor/stripe-php/lib/Transfer.php

    r2687850 r2765435  
    3434 * @property bool $reversed Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
    3535 * @property null|string|\FooSales\Stripe\Charge $source_transaction ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
    36  * @property null|string $source_type The source balance this transfer came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
     36 * @property string $source_type The source balance this transfer came from. One of <code>card</code>, <code>fpx</code>, or <code>bank_account</code>.
    3737 * @property null|string $transfer_group A string that identifies this transaction as part of a group. See the <a href="https://stripe.com/docs/connect/charges-transfers#transfer-options">Connect documentation</a> for details.
    3838 */
Note: See TracChangeset for help on using the changeset viewer.