Changeset 2926151
- Timestamp:
- 06/14/2023 07:49:39 PM (3 years ago)
- Location:
- foosales
- Files:
-
- 367 added
- 2 deleted
- 15 edited
-
tags/1.31.1 (deleted)
-
tags/1.32.2 (deleted)
-
tags/1.34.0 (added)
-
tags/1.34.0/Documentation (added)
-
tags/1.34.0/Documentation/readme.txt (added)
-
tags/1.34.0/apps (added)
-
tags/1.34.0/apps/wc_analytics (added)
-
tags/1.34.0/apps/wc_analytics/build (added)
-
tags/1.34.0/apps/wc_analytics/build/index.asset.php (added)
-
tags/1.34.0/apps/wc_analytics/build/index.js (added)
-
tags/1.34.0/apps/wc_analytics/class-foosales-analytics.php (added)
-
tags/1.34.0/class-foosales-config.php (added)
-
tags/1.34.0/classes (added)
-
tags/1.34.0/classes/class-foosales-i18n.php (added)
-
tags/1.34.0/classes/class-foosales-payment-method.php (added)
-
tags/1.34.0/classes/class-foosales-rest-api.php (added)
-
tags/1.34.0/classes/class-foosales-xmlrpc.php (added)
-
tags/1.34.0/classes/class-foosales.php (added)
-
tags/1.34.0/css (added)
-
tags/1.34.0/css/foosales-admin.css (added)
-
tags/1.34.0/default.po (added)
-
tags/1.34.0/foosales.php (added)
-
tags/1.34.0/helpers (added)
-
tags/1.34.0/helpers/foosales-api-helper.php (added)
-
tags/1.34.0/helpers/foosales-phrases-helper.php (added)
-
tags/1.34.0/images (added)
-
tags/1.34.0/images/foosales-favicon.png (added)
-
tags/1.34.0/js (added)
-
tags/1.34.0/js/foosales-admin.js (added)
-
tags/1.34.0/languages (added)
-
tags/1.34.0/languages/readme.txt (added)
-
tags/1.34.0/license.txt (added)
-
tags/1.34.0/readme.txt (added)
-
tags/1.34.0/screenshot-1.png (added)
-
tags/1.34.0/screenshot-2.png (added)
-
tags/1.34.0/screenshot-3.png (added)
-
tags/1.34.0/screenshot-4.png (added)
-
tags/1.34.0/screenshot-5.png (added)
-
tags/1.34.0/templates (added)
-
tags/1.34.0/templates/foosales-notice-woocommerce-analytics-update.php (added)
-
tags/1.34.0/templates/template-foosales-import.php (added)
-
tags/1.34.0/templates/template-foosales-settings.php (added)
-
tags/1.34.0/templates/template-product-pos-settings-required-attendee-fields.php (added)
-
tags/1.34.0/templates/template-product-pos-settings.php (added)
-
tags/1.34.0/uninstall.php (added)
-
tags/1.34.0/vendor (added)
-
tags/1.34.0/vendor/persist-admin-notices-dismissal (added)
-
tags/1.34.0/vendor/persist-admin-notices-dismissal/CHANGES.md (added)
-
tags/1.34.0/vendor/persist-admin-notices-dismissal/README.md (added)
-
tags/1.34.0/vendor/persist-admin-notices-dismissal/dismiss-notice.js (added)
-
tags/1.34.0/vendor/persist-admin-notices-dismissal/persist-admin-notices-dismissal.php (added)
-
tags/1.34.0/vendor/stripe-php (added)
-
tags/1.34.0/vendor/stripe-php/data (added)
-
tags/1.34.0/vendor/stripe-php/data/ca-certificates.crt (added)
-
tags/1.34.0/vendor/stripe-php/init.php (added)
-
tags/1.34.0/vendor/stripe-php/lib (added)
-
tags/1.34.0/vendor/stripe-php/lib/Account.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/AccountLink.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/All.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Create.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Delete.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/NestedResource.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Request.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Retrieve.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Search.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/SingletonRetrieve.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiOperations/Update.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiRequestor.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiResource.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApiResponse.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApplePayDomain.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApplicationFee.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ApplicationFeeRefund.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Apps (added)
-
tags/1.34.0/vendor/stripe-php/lib/Apps/Secret.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Balance.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BalanceTransaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BankAccount.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BaseStripeClient.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BaseStripeClientInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BillingPortal (added)
-
tags/1.34.0/vendor/stripe-php/lib/BillingPortal/Configuration.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/BillingPortal/Session.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Capability.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Card.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CashBalance.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Charge.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Checkout (added)
-
tags/1.34.0/vendor/stripe-php/lib/Checkout/Session.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Collection.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CountrySpec.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Coupon.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CreditNote.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CreditNoteLineItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Customer.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CustomerBalanceTransaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/CustomerCashBalanceTransaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Discount.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Dispute.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/EphemeralKey.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ErrorObject.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Event.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/ApiConnectionException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/ApiErrorException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/AuthenticationException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/BadMethodCallException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/CardException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/ExceptionInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/IdempotencyException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/InvalidArgumentException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/InvalidRequestException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/ExceptionInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/InvalidClientException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/InvalidGrantException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/InvalidRequestException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/InvalidScopeException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/OAuthErrorException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/UnknownOAuthErrorException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/UnsupportedGrantTypeException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/PermissionException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/RateLimitException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/SignatureVerificationException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/UnexpectedValueException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Exception/UnknownApiErrorException.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ExchangeRate.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/File.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FileLink.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FinancialConnections (added)
-
tags/1.34.0/vendor/stripe-php/lib/FinancialConnections/Account.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FinancialConnections/AccountOwner.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FinancialConnections/AccountOwnership.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FinancialConnections/Session.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/FundingInstructions.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/HttpClient (added)
-
tags/1.34.0/vendor/stripe-php/lib/HttpClient/ClientInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/HttpClient/CurlClient.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/HttpClient/StreamingClientInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Identity (added)
-
tags/1.34.0/vendor/stripe-php/lib/Identity/VerificationReport.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Identity/VerificationSession.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Invoice.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/InvoiceItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/InvoiceLineItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/Authorization.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/Card.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/CardDetails.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/Cardholder.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/Dispute.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Issuing/Transaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/LineItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/LoginLink.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Mandate.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/OAuth.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/OAuthErrorObject.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/PaymentIntent.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/PaymentLink.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/PaymentMethod.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Payout.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Person.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Plan.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Price.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Product.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/PromotionCode.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Quote.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Radar (added)
-
tags/1.34.0/vendor/stripe-php/lib/Radar/EarlyFraudWarning.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Radar/ValueList.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Radar/ValueListItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/RecipientTransfer.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Refund.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Reporting (added)
-
tags/1.34.0/vendor/stripe-php/lib/Reporting/ReportRun.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Reporting/ReportType.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/RequestTelemetry.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Review.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SearchResult.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/AbstractService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/AbstractServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/AccountLinkService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/AccountService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ApplePayDomainService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ApplicationFeeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Apps (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Apps/AppsServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Apps/SecretService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BalanceService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BalanceTransactionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BillingPortal (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BillingPortal/BillingPortalServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BillingPortal/ConfigurationService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/BillingPortal/SessionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ChargeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Checkout (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Checkout/CheckoutServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Checkout/SessionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/CoreServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/CountrySpecService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/CouponService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/CreditNoteService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/CustomerService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/DisputeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/EphemeralKeyService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/EventService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ExchangeRateService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FileLinkService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FileService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FinancialConnections (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FinancialConnections/AccountService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FinancialConnections/FinancialConnectionsServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/FinancialConnections/SessionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Identity (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Identity/IdentityServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Identity/VerificationReportService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Identity/VerificationSessionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/InvoiceItemService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/InvoiceService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/AuthorizationService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/CardService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/CardholderService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/DisputeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/IssuingServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Issuing/TransactionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/MandateService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/OAuthService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PaymentIntentService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PaymentLinkService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PaymentMethodService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PayoutService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PlanService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PriceService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ProductService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/PromotionCodeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/QuoteService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Radar (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Radar/EarlyFraudWarningService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Radar/RadarServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Radar/ValueListItemService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Radar/ValueListService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/RefundService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Reporting (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Reporting/ReportRunService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Reporting/ReportTypeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Reporting/ReportingServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ReviewService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SetupAttemptService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SetupIntentService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/ShippingRateService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Sigma (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Sigma/ScheduledQueryRunService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Sigma/SigmaServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SourceService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SubscriptionItemService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SubscriptionScheduleService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/SubscriptionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Tax (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Tax/CalculationService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Tax/TaxServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Tax/TransactionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TaxCodeService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TaxRateService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal/ConfigurationService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal/ConnectionTokenService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal/LocationService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal/ReaderService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/CustomerService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Issuing (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Issuing/CardService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/RefundService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Terminal (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Terminal/ReaderService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/TestClockService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/InboundTransferService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/OutboundPaymentService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/OutboundTransferService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedCreditService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/ReceivedDebitService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TestHelpers/Treasury/TreasuryServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TokenService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TopupService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/TransferService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/CreditReversalService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/DebitReversalService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/FinancialAccountService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/InboundTransferService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/OutboundPaymentService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/OutboundTransferService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/ReceivedCreditService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/ReceivedDebitService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/TransactionEntryService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/TransactionService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/Treasury/TreasuryServiceFactory.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Service/WebhookEndpointService.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SetupAttempt.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SetupIntent.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/ShippingRate.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Sigma (added)
-
tags/1.34.0/vendor/stripe-php/lib/Sigma/ScheduledQueryRun.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SingletonApiResource.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Source.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SourceTransaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Stripe.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/StripeClient.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/StripeClientInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/StripeObject.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/StripeStreamingClientInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Subscription.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SubscriptionItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/SubscriptionSchedule.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Tax (added)
-
tags/1.34.0/vendor/stripe-php/lib/Tax/Calculation.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Tax/CalculationLineItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Tax/Transaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Tax/TransactionLineItem.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/TaxCode.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/TaxId.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/TaxRate.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Terminal (added)
-
tags/1.34.0/vendor/stripe-php/lib/Terminal/Configuration.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Terminal/ConnectionToken.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Terminal/Location.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Terminal/Reader.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/TestHelpers (added)
-
tags/1.34.0/vendor/stripe-php/lib/TestHelpers/TestClock.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Token.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Topup.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Transfer.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/TransferReversal.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/CreditReversal.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/DebitReversal.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/FinancialAccount.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/FinancialAccountFeatures.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/InboundTransfer.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/OutboundPayment.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/OutboundTransfer.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/ReceivedCredit.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/ReceivedDebit.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/Transaction.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Treasury/TransactionEntry.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/UsageRecord.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/UsageRecordSummary.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/ApiVersion.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/CaseInsensitiveArray.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/DefaultLogger.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/LoggerInterface.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/ObjectTypes.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/RandomGenerator.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/RequestOptions.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/Set.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Util/Util.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/Webhook.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/WebhookEndpoint.php (added)
-
tags/1.34.0/vendor/stripe-php/lib/WebhookSignature.php (added)
-
trunk/classes/class-foosales-rest-api.php (modified) (2 diffs)
-
trunk/classes/class-foosales-xmlrpc.php (modified) (4 diffs)
-
trunk/classes/class-foosales.php (modified) (41 diffs)
-
trunk/default.po (modified) (3 diffs)
-
trunk/foosales.php (modified) (3 diffs)
-
trunk/helpers/foosales-api-helper.php (modified) (105 diffs)
-
trunk/helpers/foosales-phrases-helper.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (5 diffs)
-
trunk/templates/template-foosales-import.php (modified) (2 diffs)
-
trunk/vendor/stripe-php/lib/Charge.php (modified) (1 diff)
-
trunk/vendor/stripe-php/lib/Issuing/Cardholder.php (modified) (1 diff)
-
trunk/vendor/stripe-php/lib/LoginLink.php (modified) (1 diff)
-
trunk/vendor/stripe-php/lib/Service/ChargeService.php (modified) (2 diffs)
-
trunk/vendor/stripe-php/lib/Stripe.php (modified) (1 diff)
-
trunk/vendor/stripe-php/lib/Token.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
foosales/trunk/classes/class-foosales-rest-api.php
r2919862 r2926151 363 363 $result = fsfwc_do_update_product( json_decode( $request->get_param( 'param2' ), true ), $platform ); 364 364 365 if ( false !== $result && is_array( $result ) ) {365 if ( ! empty( $result ) ) { 366 366 $updated_product = $result['updated_product']; 367 367 $sale_product_ids = $result['sale_product_ids']; … … 1156 1156 * @since 1.31.0 1157 1157 * @param boolean $purchasable Whether the variation is purchasable. 1158 * @param WC_Product_Variation $ productThe product variation.1158 * @param WC_Product_Variation $wc_product_variation The product variation. 1159 1159 * 1160 1160 * @return boolean 1161 1161 */ 1162 public function fsfwc_variation_is_purchasable( $purchasable, $ product) {1162 public function fsfwc_variation_is_purchasable( $purchasable, $wc_product_variation ) { 1163 1163 return true; 1164 1164 } -
foosales/trunk/classes/class-foosales-xmlrpc.php
r2921885 r2926151 194 194 $result = fsfwc_do_update_product( $product_data ); 195 195 196 if ( false !== $result && is_array( $result ) ) {196 if ( ! empty( $result ) ) { 197 197 $updated_product = $result['updated_product']; 198 198 $sale_product_ids = $result['sale_product_ids']; … … 215 215 */ 216 216 function fsfwc_create_order( $args ) { 217 fsfwc_create_update_order( $args );217 $this->fsfwc_create_update_order( $args ); 218 218 } 219 219 … … 243 243 $existing_order_id = $args[15]; 244 244 245 $ new_order = fsfwc_do_create_update_order(245 $created_updated_order = fsfwc_do_create_update_order( 246 246 array( 247 247 $order_date, … … 264 264 $response = array( 265 265 'status' => 'success', 266 'order' => fsfwc_do_get_single_order( $ new_order ),266 'order' => fsfwc_do_get_single_order( $created_updated_order ), 267 267 ); 268 268 -
foosales/trunk/classes/class-foosales.php
r2919862 r2926151 89 89 add_filter( 'woocommerce_email_enabled_new_order', array( $this, 'fsfwc_conditionally_send_wc_email' ), 10, 2 ); 90 90 91 // WooCommerce HPOS. 92 add_filter( 'woocommerce_order_list_table_prepare_items_query_args', array( $this, 'fsfwc_filter_order_results_hpos' ) ); 93 add_filter( 'manage_woocommerce_page_wc-orders_columns', array( $this, 'fsfwc_order_column' ), 20 ); 94 add_action( 'woocommerce_order_list_table_restrict_manage_orders', array( $this, 'fsfwc_filter_orders_payment_method' ), 9999 ); 95 add_action( 'woocommerce_order_list_table_restrict_manage_orders', array( $this, 'fsfwc_filter_orders_cashier' ), 9999 ); 96 add_action( 'manage_woocommerce_page_wc-orders_custom_column', array( $this, 'fsfwc_order_column_content' ), 20, 2 ); 97 98 // Traditional CPT-based orders. 91 99 add_filter( 'parse_query', array( $this, 'fsfwc_filter_order_results' ) ); 92 100 add_filter( 'manage_edit-shop_order_columns', array( $this, 'fsfwc_order_column' ), 20 ); 93 add_action( 'restrict_manage_posts', array( $this, 'fsfwc_filter_orders_payment_method' ) ); 94 add_action( 'restrict_manage_posts', array( $this, 'fsfwc_filter_orders_cashier' ) ); 95 add_action( 'manage_shop_order_posts_custom_column', array( $this, 'fsfwc_order_column_content' ) ); 101 add_action( 'restrict_manage_posts', array( $this, 'fsfwc_filter_orders_payment_method' ), 9999 ); 102 add_action( 'restrict_manage_posts', array( $this, 'fsfwc_filter_orders_cashier' ), 9999 ); 103 add_action( 'manage_shop_order_posts_custom_column', array( $this, 'fsfwc_order_column_content' ), 20, 2 ); 104 96 105 add_action( 'woocommerce_admin_order_data_after_order_details', array( $this, 'fsfwc_order_meta_general' ) ); 97 add_action( ' save_post', array( $this, 'fsfwc_order_meta_save_cashier' ) );106 add_action( 'woocommerce_process_shop_order_meta', array( $this, 'fsfwc_order_meta_save_cashier' ) ); 98 107 add_action( 'woocommerce_checkout_create_order', array( $this, 'fsfwc_before_checkout_create_order' ), 20, 2 ); 99 108 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'fsfwc_update_order_meta' ) ); … … 950 959 return $links; 951 960 961 } 962 963 /** 964 * Filter WooCommerce orders listing based on FooSales filter selection. 965 * 966 * @since 1.34.0 967 * @param array $args The query arguments used in the (Custom Order Table-powered) order list. 968 * 969 * @return array 970 */ 971 public function fsfwc_filter_order_results_hpos( $args ) { 972 973 global $pagenow; 974 975 if ( is_admin() && 'admin.php' === $pagenow && isset( $_GET['page'] ) && 'wc-orders' === $_GET['page'] && 'shop_order' === $args['type'] && isset( $_GET['foosales_payment_method_filter'] ) && isset( $_GET['foosales_cashier_filter'] ) && ( '' !== sanitize_text_field( wp_unslash( $_GET['foosales_payment_method_filter'] ) ) || '' !== sanitize_text_field( wp_unslash( $_GET['foosales_cashier_filter'] ) ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 976 977 if ( ! empty( $args['meta_query'] ) ) { 978 $args['meta_query']['relation'] = 'AND'; 979 } else { 980 $args['meta_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 981 'relation' => 'AND', 982 ); 983 } 984 985 if ( '' !== sanitize_text_field( wp_unslash( $_GET['foosales_payment_method_filter'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 986 $foosales_payment_method_filter = sanitize_text_field( wp_unslash( $_GET['foosales_payment_method_filter'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 987 $payment_method_options = array( 988 'pos-cash' => 'foosales_cash', 989 'pos-card' => 'foosales_card', 990 'pos-direct-bank-transfer' => 'foosales_direct_bank_transfer', 991 'pos-check-payment' => 'foosales_check_payment', 992 'pos-cash-on-delivery' => 'foosales_cash_on_delivery', 993 'pos-square-manual' => 'foosales_square_manual', 994 'pos-square-terminal' => 'foosales_square_terminal', 995 'pos-square-reader' => 'foosales_square_reader', 996 'pos-stripe-manual' => 'foosales_stripe_manual', 997 'pos-stripe-reader' => 'foosales_stripe_reader', 998 'pos-stripe-chipper' => 'foosales_stripe_chipper', 999 'pos-stripe-wisepad' => 'foosales_stripe_wisepad', 1000 'pos-stripe-reader-m2' => 'foosales_stripe_reader_m2', 1001 'pos-other' => 'foosales_other', 1002 ); 1003 1004 if ( in_array( $foosales_payment_method_filter, array_keys( $payment_method_options ), true ) ) { 1005 if ( 'pos-square-reader' === $foosales_payment_method_filter ) { 1006 $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 1007 'relation' => 'OR', 1008 array( 1009 'key' => '_foosales_payment_method', 1010 'value' => 'foosales_square_reader', 1011 ), 1012 array( 1013 'key' => '_foosales_payment_method', 1014 'value' => 'foosales_square', 1015 ), 1016 ); 1017 } else { 1018 $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 1019 'key' => '_foosales_payment_method', 1020 'value' => $payment_method_options[ $foosales_payment_method_filter ], 1021 ); 1022 } 1023 } else { 1024 switch ( $foosales_payment_method_filter ) { 1025 case 'pos-all': 1026 // All FooSales payments. 1027 $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 1028 'key' => '_foosales_order_source', 1029 'value' => 'foosales_app', 1030 ); 1031 1032 break; 1033 case 'pos-none': 1034 // Online orders only. 1035 $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 1036 'relation' => 'OR', 1037 array( 1038 'key' => '_foosales_payment_method', 1039 'compare' => 'NOT EXISTS', 1040 ), 1041 array( 1042 'key' => '_foosales_payment_method', 1043 'value' => '', 1044 'compare' => '=', 1045 ), 1046 ); 1047 1048 break; 1049 } 1050 } 1051 } 1052 1053 if ( '' !== sanitize_text_field( wp_unslash( $_GET['foosales_cashier_filter'] ) ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 1054 $foosales_cashier_filter = sanitize_text_field( wp_unslash( $_GET['foosales_cashier_filter'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 1055 1056 $args['meta_query'][] = array( // phpcs:ignore WordPress.DB.SlowDBQuery 1057 'key' => '_foosales_user_id', 1058 'value' => $foosales_cashier_filter, 1059 'compare' => '=', 1060 ); 1061 } 1062 } 1063 1064 return $args; 952 1065 } 953 1066 … … 1057 1170 * 1058 1171 * @since 1.10.0 1059 */ 1060 public function fsfwc_filter_orders_payment_method() { 1061 1062 global $wpdb, $post_type; 1172 * @param string $post_type The post type. 1173 */ 1174 public function fsfwc_filter_orders_payment_method( $post_type ) { 1063 1175 1064 1176 if ( 'shop_order' === $post_type ) { … … 1129 1241 * 1130 1242 * @since 1.22.0 1131 */ 1132 public function fsfwc_filter_orders_cashier() { 1133 1134 global $wpdb, $post_type, $wp_roles; 1243 * @param string $post_type The post type. 1244 */ 1245 public function fsfwc_filter_orders_cashier( $post_type ) { 1246 1247 global $wp_roles; 1135 1248 1136 1249 if ( 'shop_order' === $post_type ) { … … 1226 1339 * @since 1.10.0 1227 1340 * @param string $column The column for which content should be added. 1228 */ 1229 public function fsfwc_order_column_content( $column ) { 1230 global $post; 1341 * @param int $order_id The ID of the current order. 1342 */ 1343 public function fsfwc_order_column_content( $column, $order_id ) { 1344 $order = wc_get_order( $order_id ); 1231 1345 1232 1346 if ( 'foosales_column_cashier' === $column ) { 1233 1347 1234 $foosales_user_id = get_post_meta( $post->ID,'_foosales_user_id', true );1348 $foosales_user_id = $order->get_meta( '_foosales_user_id', true ); 1235 1349 1236 1350 if ( '' !== $foosales_user_id ) { … … 1244 1358 } elseif ( 'foosales_column_type' === $column ) { 1245 1359 1246 $foosales_order_type = get_post_meta( $post->ID,'_foosales_payment_method', true );1360 $foosales_order_type = $order->get_meta( '_foosales_payment_method', true ); 1247 1361 1248 1362 $payment_methods = fsfwc_do_get_all_payment_methods( true ); … … 1290 1404 public function fsfwc_order_meta_general( $order ) { 1291 1405 1292 $foosales_source = get_post_meta( $order->get_id(),'_foosales_order_source', true );1293 $foosales_payment_method = get_post_meta( $order->get_id(),'_foosales_payment_method', true );1294 $foosales_payment_method_pub = get_post_meta( $order->get_id(),'Order Payment Method', true );1295 $foosales_user_id = get_post_meta( $order->get_id(),'_foosales_user_id', true );1406 $foosales_source = $order->get_meta( '_foosales_order_source', true ); 1407 $foosales_payment_method = $order->get_meta( '_foosales_payment_method', true ); 1408 $foosales_payment_method_pub = $order->get_meta( 'Order Payment Method', true ); 1409 $foosales_user_id = $order->get_meta( '_foosales_user_id', true ); 1296 1410 1297 1411 if ( '' !== $foosales_user_id ) { … … 1333 1447 1334 1448 echo "<br class='clear' />"; 1335 echo '<p class="form-field form-field-wide">'; 1336 echo '<label for="_foosales_user_id">' . esc_html( $this->foosales_phrases['label_order_cashier'] ) . ':'; 1337 1338 if ( '' !== $foosales_user_id ) { 1339 echo '<a href="' . esc_attr( admin_url( 'edit.php?post_type=shop_order&foosales_payment_method_filter&foosales_cashier_filter=' . $foosales_user_id ) ) . '" class="foosales-right-link" target="_blank">' . esc_html( $this->foosales_phrases['text_view_other_orders'] ) . ' →</a>'; 1340 } 1341 1342 echo '</label>'; 1343 ?> 1344 <select id="_foosales_user_id" name="_foosales_user_id"> 1345 <option value="">(<?php echo esc_html( $this->foosales_phrases['filter_none'] ); ?>)</option> 1346 <?php 1347 foreach ( $foosales_users as $foosales_user ) { 1348 echo '<option value="' . esc_attr( $foosales_user->ID ) . '" '; 1349 1350 if ( strval( $foosales_user->ID ) === $foosales_user_id ) { 1351 echo ' selected '; 1352 } 1353 1354 echo ' >' . esc_html( $foosales_user->display_name ) . '</option>'; 1355 } 1356 ?> 1357 </select> 1358 <?php 1359 wp_nonce_field( '_foosales_save_order_cashier_' . $order->get_id(), '_foosales_order_cashier_nonce' ); 1360 1361 echo '</p>'; 1449 1450 $cashier_options = array( '' => '(' . $this->foosales_phrases['filter_none'] . ')' ); 1451 1452 foreach ( $foosales_users as $foosales_user ) { 1453 $cashier_options[ (string) $foosales_user->ID ] = $foosales_user->display_name; 1454 } 1455 1456 woocommerce_wp_select( 1457 array( 1458 'id' => '_foosales_user_id', 1459 'label' => $this->foosales_phrases['label_order_cashier'] . ':' . ( '' !== $foosales_user_id ? '<a href="' . esc_attr( admin_url( 'edit.php?post_type=shop_order&foosales_payment_method_filter&foosales_cashier_filter=' . $foosales_user_id ) ) . '" class="foosales-right-link" target="_blank">' . esc_html( $this->foosales_phrases['text_view_other_orders'] ) . ' →</a>' : '' ), 1460 'value' => (string) $foosales_user_id, 1461 'options' => $cashier_options, 1462 'wrapper_class' => 'form-field-wide', 1463 ) 1464 ); 1465 1362 1466 echo "<br class='clear' />"; 1363 1467 echo '<h3>' . esc_html( $this->foosales_phrases['title_payment_details'] ) . '</h3>'; … … 1383 1487 ) ) { 1384 1488 1385 $square_order_id = get_post_meta( $order->get_id(),'_foosales_square_order_id', true );1489 $square_order_id = $order->get_meta( '_foosales_square_order_id', true ); 1386 1490 1387 1491 if ( '' !== $square_order_id ) { 1388 1492 1389 $square_auto_refund = get_post_meta( $order->get_id(),'_foosales_square_order_auto_refund', true );1493 $square_auto_refund = $order->get_meta( '_foosales_square_order_auto_refund', true ); 1390 1494 1391 1495 echo '<br/>'; … … 1415 1519 ) ) { 1416 1520 1417 $stripe_payment_id = get_post_meta( $order->get_id(),'_foosales_stripe_payment_id', true );1521 $stripe_payment_id = $order->get_meta( '_foosales_stripe_payment_id', true ); 1418 1522 1419 1523 if ( '' !== $stripe_payment_id ) { … … 1447 1551 * 1448 1552 * @since 1.27.0 1449 * @param int $post_id The post ID. 1450 */ 1451 public function fsfwc_order_meta_save_cashier( $post_id ) { 1452 1453 // Do not save if this is an autosave or the form has not been submitted. 1454 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 1455 return; 1456 } 1457 1458 if ( isset( $_POST['_foosales_order_cashier_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_foosales_order_cashier_nonce'] ) ), '_foosales_save_order_cashier_' . $post_id ) ) { 1459 // Check that the user has appropriate permissions. 1460 if ( isset( $_POST['post_type'] ) && 'shop_order' === $_POST['post_type'] ) { 1461 if ( current_user_can( 'edit_shop_order', $post_id ) ) { 1462 if ( isset( $_POST['_foosales_user_id'] ) ) { 1463 update_post_meta( $post_id, '_foosales_user_id', sanitize_text_field( wp_unslash( $_POST['_foosales_user_id'] ) ) ); 1464 } 1465 } 1466 } 1553 * @param int $order_id The order ID. 1554 */ 1555 public function fsfwc_order_meta_save_cashier( $order_id ) { 1556 if ( isset( $_POST['_foosales_user_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing 1557 $order = wc_get_order( $order_id ); 1558 $order->update_meta_data( '_foosales_user_id', sanitize_text_field( wp_unslash( $_POST['_foosales_user_id'] ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing 1559 $order->save(); 1467 1560 } 1468 1561 } … … 1574 1667 public function fsfwc_conditionally_send_wc_email( $whether_enabled, $order ) { 1575 1668 1576 if ( ! empty( $order ) && 'foosales_app' === get_post_meta( $order->get_id(),'_foosales_order_source', true ) ) {1669 if ( ! empty( $order ) && 'foosales_app' === $order->get_meta( '_foosales_order_source', true ) ) { 1577 1670 1578 1671 $disable_new_order_emails = 'yes' === get_option( 'globalFooSalesDisableNewOrderEmails', '' ); … … 1686 1779 public function fsfwc_update_order_meta( $order_id ) { 1687 1780 1688 update_post_meta( $order_id, '_foosales_order_source', 'online' ); 1781 $order = wc_get_order( $order_id ); 1782 1783 $order->update_meta_data( '_foosales_order_source', 'online' ); 1784 $order->update_meta_data( '_foosales_payment_method', '' ); 1785 1786 $order->save(); 1689 1787 1690 1788 } … … 1805 1903 global $foosales_products_default_cart_quantity_step; 1806 1904 global $foosales_products_default_cart_quantity_unit; 1905 1906 $wc_product = wc_get_product( $post->ID ); 1807 1907 1808 1908 echo '<div class="options_group">'; … … 1849 1949 ); 1850 1950 1851 $foosales_product_override_default_cart_quantity_unit = get_post_meta( $post->ID,'foosales_product_override_default_cart_quantity_unit', true );1951 $foosales_product_override_default_cart_quantity_unit = $wc_product->get_meta( 'foosales_product_override_default_cart_quantity_unit', true ); 1852 1952 1853 1953 $foosales_product_cart_quantity_unit_args = array( … … 1864 1964 woocommerce_wp_text_input( $foosales_product_cart_quantity_unit_args ); 1865 1965 1866 wp_nonce_field( '_foosales_save_product_decimal_quantity_meta_' . $ post->ID, '_foosales_product_decimal_quantity_meta_nonce' );1966 wp_nonce_field( '_foosales_save_product_decimal_quantity_meta_' . $wc_product->get_id(), '_foosales_product_decimal_quantity_meta_nonce' ); 1867 1967 1868 1968 echo '</div>'; … … 1873 1973 * 1874 1974 * @since 1.27.0 1875 * @param int $p ost_id The current product post ID.1876 */ 1877 public function fsfwc_woocommerce_process_product_cart_minimum_step_field( $p ost_id ) {1975 * @param int $product_id The current product ID. 1976 */ 1977 public function fsfwc_woocommerce_process_product_cart_minimum_step_field( $product_id ) { 1878 1978 global $foosales_products_default_minimum_cart_quantity; 1879 1979 global $foosales_products_default_cart_quantity_step; 1880 1980 global $foosales_products_default_cart_quantity_unit; 1981 1982 $wc_product = wc_get_product( $product_id ); 1881 1983 1882 1984 $new_minimum_cart_quantity = $foosales_products_default_minimum_cart_quantity; … … 1885 1987 $new_cart_quantity_unit = $foosales_products_default_cart_quantity_unit; 1886 1988 1887 if ( isset( $_POST['_foosales_product_decimal_quantity_meta_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_foosales_product_decimal_quantity_meta_nonce'] ) ), '_foosales_save_product_decimal_quantity_meta_' . $p ost_id ) ) {1989 if ( isset( $_POST['_foosales_product_decimal_quantity_meta_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_foosales_product_decimal_quantity_meta_nonce'] ) ), '_foosales_save_product_decimal_quantity_meta_' . $product_id ) ) { 1888 1990 if ( isset( $_POST['foosales_product_minimum_cart_quantity'] ) ) { 1889 1991 $new_minimum_cart_quantity = sanitize_text_field( wp_unslash( $_POST['foosales_product_minimum_cart_quantity'] ) ); … … 1903 2005 } 1904 2006 1905 update_post_meta( $post_id, 'foosales_product_minimum_cart_quantity', $new_minimum_cart_quantity ); 1906 update_post_meta( $post_id, 'foosales_product_cart_quantity_step', $new_cart_quantity_step ); 1907 update_post_meta( $post_id, 'foosales_product_override_default_cart_quantity_unit', $new_override_cart_quantity_unit ); 1908 update_post_meta( $post_id, 'foosales_product_cart_quantity_unit', $new_cart_quantity_unit ); 2007 $wc_product->update_meta_data( 'foosales_product_minimum_cart_quantity', $new_minimum_cart_quantity ); 2008 $wc_product->update_meta_data( 'foosales_product_cart_quantity_step', $new_cart_quantity_step ); 2009 $wc_product->update_meta_data( 'foosales_product_override_default_cart_quantity_unit', $new_override_cart_quantity_unit ); 2010 $wc_product->update_meta_data( 'foosales_product_cart_quantity_unit', $new_cart_quantity_unit ); 2011 $wc_product->save(); 1909 2012 } 1910 2013 … … 1914 2017 * @since 1.27.0 1915 2018 * @param float $min The current minimum cart quantity amount. 1916 * @param WC_Product $ product The current WooCommerce cart product.1917 */ 1918 public function fsfwc_product_quantity_input_min( $min, $ product ) {2019 * @param WC_Product $wc_product The current WooCommerce cart product. 2020 */ 2021 public function fsfwc_product_quantity_input_min( $min, $wc_product ) { 1919 2022 global $foosales_products_default_minimum_cart_quantity; 1920 2023 1921 if ( false !== $product ) { 1922 $product_id = $product->get_id(); 1923 1924 $foosales_product_minimum_cart_quantity = get_post_meta( $product_id, 'foosales_product_minimum_cart_quantity', true ); 2024 if ( false !== $wc_product ) { 2025 $foosales_product_minimum_cart_quantity = $wc_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 1925 2026 1926 2027 if ( '' === $foosales_product_minimum_cart_quantity ) { … … 1939 2040 * @since 1.27.0 1940 2041 * @param float $step The current cart quantity step amount. 1941 * @param WC_Product $ product The current WooCommerce cart product.1942 */ 1943 public function fsfwc_product_quantity_input_step( $step, $ product ) {2042 * @param WC_Product $wc_product The current WooCommerce cart product. 2043 */ 2044 public function fsfwc_product_quantity_input_step( $step, $wc_product ) { 1944 2045 global $foosales_products_default_cart_quantity_step; 1945 2046 1946 if ( false !== $product ) { 1947 $product_id = $product->get_id(); 1948 1949 $foosales_product_cart_quantity_step = get_post_meta( $product_id, 'foosales_product_cart_quantity_step', true ); 2047 if ( false !== $wc_product ) { 2048 $foosales_product_cart_quantity_step = $wc_product->get_meta( 'foosales_product_cart_quantity_step', true ); 1950 2049 1951 2050 if ( '' === $foosales_product_cart_quantity_step ) { … … 1964 2063 * @since 1.27.0 1965 2064 * @param array $args The product's input arguments. 1966 * @param WC_Product $ product The current WooCommerce product.1967 */ 1968 public function fsfwc_product_quantity_input_args( $args, $ product ) {2065 * @param WC_Product $wc_product The current WooCommerce product. 2066 */ 2067 public function fsfwc_product_quantity_input_args( $args, $wc_product ) { 1969 2068 global $foosales_products_default_minimum_cart_quantity; 1970 2069 global $foosales_products_default_cart_quantity_step; 1971 2070 1972 $product_id = $ product->get_id();1973 $product_parent_id = $ product->get_parent_id();2071 $product_id = $wc_product->get_id(); 2072 $product_parent_id = $wc_product->get_parent_id(); 1974 2073 1975 2074 if ( $product_parent_id > 0 ) { … … 1977 2076 } 1978 2077 1979 $foosales_product_minimum_cart_quantity = get_post_meta( $product_id, 'foosales_product_minimum_cart_quantity', true ); 2078 $temp_product = wc_get_product( $product_id ); 2079 2080 $foosales_product_minimum_cart_quantity = $temp_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 1980 2081 1981 2082 if ( '' === $foosales_product_minimum_cart_quantity ) { … … 1997 2098 } 1998 2099 1999 $foosales_product_cart_quantity_step = get_post_meta( $product_id,'foosales_product_cart_quantity_step', true );2100 $foosales_product_cart_quantity_step = $temp_product->get_meta( 'foosales_product_cart_quantity_step', true ); 2000 2101 2001 2102 if ( '' === $foosales_product_cart_quantity_step ) { … … 2013 2114 * 2014 2115 * @since 1.27.0 2015 * @param array $args The product variation's arguments.2016 * @param WC_Product $product The current WooCommerce product.2017 * @param WC_Product _Variation $variation The current WooCommerce product variation.2018 */ 2019 public function fsfwc_product_available_variation( $args, $ product, $variation ) {2116 * @param array $args The product variation's arguments. 2117 * @param WC_Product_Variable $wc_product The current WooCommerce product. 2118 * @param WC_Product $wc_product_variation The current WooCommerce product variation. 2119 */ 2120 public function fsfwc_product_available_variation( $args, $wc_product, $wc_product_variation ) { 2020 2121 global $foosales_products_default_minimum_cart_quantity; 2021 2122 2022 $product_id = $product->get_id(); 2023 2024 $foosales_product_minimum_cart_quantity = get_post_meta( $product_id, 'foosales_product_minimum_cart_quantity', true ); 2123 $foosales_product_minimum_cart_quantity = $wc_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 2025 2124 2026 2125 if ( '' === $foosales_product_minimum_cart_quantity ) { … … 2059 2158 2060 2159 foreach ( $products as $product_id => $qty ) { 2061 $foosales_product_minimum_cart_quantity = get_post_meta( $product_id, 'foosales_product_minimum_cart_quantity', true ); 2160 $wc_product = wc_get_product( $product_id ); 2161 2162 $foosales_product_minimum_cart_quantity = $wc_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 2062 2163 2063 2164 if ( '' === $foosales_product_minimum_cart_quantity ) { … … 2065 2166 } 2066 2167 2067 $foosales_product_cart_quantity_step = get_post_meta( $product_id,'foosales_product_cart_quantity_step', true );2168 $foosales_product_cart_quantity_step = $wc_product->get_meta( 'foosales_product_cart_quantity_step', true ); 2068 2169 2069 2170 if ( '' === $foosales_product_cart_quantity_step ) { … … 2071 2172 } 2072 2173 2073 $foosales_product_override_default_cart_quantity_unit = get_post_meta( $product_id,'foosales_product_override_default_cart_quantity_unit', true );2174 $foosales_product_override_default_cart_quantity_unit = $wc_product->get_meta( 'foosales_product_override_default_cart_quantity_unit', true ); 2074 2175 2075 2176 if ( 'yes' === $foosales_product_override_default_cart_quantity_unit ) { 2076 $foosales_product_cart_quantity_unit = get_post_meta( $product_id,'foosales_product_cart_quantity_unit', true );2177 $foosales_product_cart_quantity_unit = $wc_product->get_meta( 'foosales_product_cart_quantity_unit', true ); 2077 2178 } else { 2078 2179 $foosales_product_cart_quantity_unit = $foosales_products_default_cart_quantity_unit; … … 2112 2213 global $foosales_products_default_minimum_cart_quantity; 2113 2214 2114 $foosales_product_minimum_cart_quantity = get_post_meta( $product_id, 'foosales_product_minimum_cart_quantity', true ); 2215 $wc_product = wc_get_product( $product_id ); 2216 2217 $foosales_product_minimum_cart_quantity = $wc_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 2115 2218 2116 2219 if ( ! $foosales_product_minimum_cart_quantity ) { … … 2146 2249 global $post; 2147 2250 2251 $wc_product = wc_get_product( $post->ID ); 2252 2148 2253 if ( ! function_exists( 'is_plugin_active' ) || ! function_exists( 'is_plugin_active_for_network' ) ) { 2149 2254 … … 2155 2260 2156 2261 // POS Settings. 2157 $foosales_product_show_in_pos = get_post_meta( $post->ID,'foosales_product_show_in_pos', true );2158 $foosales_product_pin_in_pos = get_post_meta( $post->ID,'foosales_product_pin_in_pos', true );2262 $foosales_product_show_in_pos = $wc_product->get_meta( 'foosales_product_show_in_pos', true ); 2263 $foosales_product_pin_in_pos = $wc_product->get_meta( 'foosales_product_pin_in_pos', true ); 2159 2264 2160 2265 $pos_settings = array( … … 2166 2271 2167 2272 // Event Settings. 2168 $fooevents_pos_attendee_details = get_post_meta( $post->ID,'WooCommerceEventsPOSAttendeeDetails', true );2169 $fooevents_pos_attendee_email = get_post_meta( $post->ID,'WooCommerceEventsPOSAttendeeEmail', true );2170 $fooevents_pos_attendee_telephone = get_post_meta( $post->ID,'WooCommerceEventsPOSAttendeeTelephone', true );2171 $fooevents_pos_attendee_company = get_post_meta( $post->ID,'WooCommerceEventsPOSAttendeeCompany', true );2172 $fooevents_pos_attendee_designation = get_post_meta( $post->ID,'WooCommerceEventsPOSAttendeeDesignation', true );2273 $fooevents_pos_attendee_details = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeDetails', true ); 2274 $fooevents_pos_attendee_email = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeEmail', true ); 2275 $fooevents_pos_attendee_telephone = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeTelephone', true ); 2276 $fooevents_pos_attendee_company = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeCompany', true ); 2277 $fooevents_pos_attendee_designation = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeDesignation', true ); 2173 2278 2174 2279 ob_start(); 2175 2280 2176 require _once $this->foosales_config->template_path . 'template-product-pos-settings-required-attendee-fields.php';2281 require plugin_dir_path( __FILE__ ) . 'templates/product-pos-settings-required-attendee-fields.php'; 2177 2282 2178 2283 $required_attende_fields = ob_get_clean(); … … 2183 2288 } 2184 2289 2185 require_once $this->foosales_config->template_path . 'template-product-pos-settings.php';2290 require_once plugin_dir_path( __FILE__ ) . 'templates/product-pos-settings.php'; 2186 2291 2187 2292 } … … 2191 2296 * 2192 2297 * @global object $woocommerce_errors 2193 * @param int $p ost_id The post ID.2194 */ 2195 public function fsfwc_process_product_pos_settings_options( $p ost_id ) {2298 * @param int $product_id The product ID. 2299 */ 2300 public function fsfwc_process_product_pos_settings_options( $product_id ) { 2196 2301 2197 2302 global $woocommerce_errors; 2198 2303 2199 if ( isset( $_POST['_foosales_pos_settings_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_foosales_pos_settings_nonce'] ) ), '_foosales_save_pos_settings_' . $post_id ) ) { 2304 if ( isset( $_POST['_foosales_pos_settings_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_foosales_pos_settings_nonce'] ) ), '_foosales_save_pos_settings_' . $product_id ) ) { 2305 2306 $wc_product = wc_get_product( $product_id ); 2200 2307 2201 2308 $foosales_product_show_in_pos = isset( $_POST['foosales_product_show_in_pos'] ) ? 'yes' : 'no'; 2202 2309 2203 update_post_meta( $post_id,'foosales_product_show_in_pos', $foosales_product_show_in_pos );2310 $wc_product->update_meta_data( 'foosales_product_show_in_pos', $foosales_product_show_in_pos ); 2204 2311 2205 2312 $foosales_product_pin_in_pos = isset( $_POST['foosales_product_pin_in_pos'] ) ? 'yes' : 'no'; 2206 2313 2207 update_post_meta( $post_id,'foosales_product_pin_in_pos', $foosales_product_pin_in_pos );2314 $wc_product->update_meta_data( 'foosales_product_pin_in_pos', $foosales_product_pin_in_pos ); 2208 2315 2209 2316 if ( isset( $_POST['WooCommerceEventsPOSAttendeeDetails'] ) ) { 2210 2317 2211 2318 $fooevents_pos_attendee_details = sanitize_text_field( wp_unslash( $_POST['WooCommerceEventsPOSAttendeeDetails'] ) ); 2212 update_post_meta( $post_id,'WooCommerceEventsPOSAttendeeDetails', $fooevents_pos_attendee_details );2319 $wc_product->update_meta_data( 'WooCommerceEventsPOSAttendeeDetails', $fooevents_pos_attendee_details ); 2213 2320 2214 2321 } … … 2217 2324 2218 2325 $fooevents_pos_attendee_email = sanitize_text_field( wp_unslash( $_POST['WooCommerceEventsPOSAttendeeEmail'] ) ); 2219 update_post_meta( $post_id,'WooCommerceEventsPOSAttendeeEmail', $fooevents_pos_attendee_email );2326 $wc_product->update_meta_data( 'WooCommerceEventsPOSAttendeeEmail', $fooevents_pos_attendee_email ); 2220 2327 2221 2328 } … … 2224 2331 2225 2332 $fooevents_pos_attendee_telephone = sanitize_text_field( wp_unslash( $_POST['WooCommerceEventsPOSAttendeeTelephone'] ) ); 2226 update_post_meta( $post_id,'WooCommerceEventsPOSAttendeeTelephone', $fooevents_pos_attendee_telephone );2333 $wc_product->update_meta_data( 'WooCommerceEventsPOSAttendeeTelephone', $fooevents_pos_attendee_telephone ); 2227 2334 2228 2335 } … … 2231 2338 2232 2339 $fooevents_pos_attendee_company = sanitize_text_field( wp_unslash( $_POST['WooCommerceEventsPOSAttendeeCompany'] ) ); 2233 update_post_meta( $post_id,'WooCommerceEventsPOSAttendeeCompany', $fooevents_pos_attendee_company );2340 $wc_product->update_meta_data( 'WooCommerceEventsPOSAttendeeCompany', $fooevents_pos_attendee_company ); 2234 2341 2235 2342 } … … 2238 2345 2239 2346 $fooevents_pos_attendee_designation = sanitize_text_field( wp_unslash( $_POST['WooCommerceEventsPOSAttendeeDesignation'] ) ); 2240 update_post_meta( $post_id, 'WooCommerceEventsPOSAttendeeDesignation', $fooevents_pos_attendee_designation ); 2241 2242 } 2347 $wc_product->update_meta_data( 'WooCommerceEventsPOSAttendeeDesignation', $fooevents_pos_attendee_designation ); 2348 2349 } 2350 2351 $wc_product->save(); 2243 2352 } 2244 2353 … … 2251 2360 * @param string $loop The WordPress loop. 2252 2361 * @param array $variation_data The variation data. 2253 * @param WP_Post $ post Thepost object.2254 */ 2255 public function fsfwc_add_variation_options( $loop, $variation_data, $ post) {2362 * @param WP_Post $variation The variation post object. 2363 */ 2364 public function fsfwc_add_variation_options( $loop, $variation_data, $variation ) { 2256 2365 2257 2366 // Show variation in POS. 2258 $foosales_variation_show_in_pos = get_post_meta( $ post->ID, 'foosales_variation_show_in_pos', true );2367 $foosales_variation_show_in_pos = get_post_meta( $variation->ID, 'foosales_variation_show_in_pos', true ); 2259 2368 2260 2369 woocommerce_wp_checkbox( … … 2269 2378 ); 2270 2379 2271 wp_nonce_field( '_foosales_add_variation_options_' . $ post->ID, '_foosales_add_variation_options_nonce_' . $post->ID );2380 wp_nonce_field( '_foosales_add_variation_options_' . $variation->ID, '_foosales_add_variation_options_nonce_' . $variation->ID ); 2272 2381 } 2273 2382 … … 2285 2394 $foosales_variation_show_in_pos = isset( $_POST['foosales_variation_show_in_pos'][ $index ] ) ? 'yes' : 'no'; 2286 2395 2287 update_post_meta( $variation_id, 'foosales_variation_show_in_pos', $foosales_variation_show_in_pos ); 2396 $wc_product_variation = wc_get_product( $variation_id ); 2397 2398 $wc_product_variation->update_meta_data( 'foosales_variation_show_in_pos', $foosales_variation_show_in_pos ); 2399 $wc_product_variation->save(); 2288 2400 } 2289 2401 -
foosales/trunk/default.po
r2919862 r2926151 2 2 msgstr "" 3 3 "Project-Id-Version: \n" 4 "POT-Creation-Date: 2023-0 5-31 13:06-0700\n"5 "PO-Revision-Date: 2023-0 5-31 13:06-0700\n"4 "POT-Creation-Date: 2023-06-14 11:59-0700\n" 5 "PO-Revision-Date: 2023-06-14 11:59-0700\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 102 102 #: helpers/foosales-phrases-helper.php:30 103 103 msgid "" 104 "We hope that you enjoyed your 30-day free trial. Please purchase a FooSales "104 "We hope that you enjoyed your 7-day free trial. Please purchase a FooSales " 105 105 "plan to continue using the FooSales apps." 106 106 msgstr "" … … 212 212 "Your store needs to be linked to a FooSales account in order to use the " 213 213 "FooSales apps. Click the button below to sign-up for a FooSales account and " 214 "start your 30-day free trial today!"214 "start your 7-day free trial today!" 215 215 msgstr "" 216 216 -
foosales/trunk/foosales.php
r2919862 r2926151 3 3 * Plugin Name: FooSales — Point of Sale (POS) for WooCommerce 4 4 * 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 enable you to sell your products in person while accepting payments using Square™ and Stripe™ or manually using any third-party card reader. 5 * Version: 1.3 3.05 * Version: 1.34.0 6 6 * Author: FooSales 7 7 * Author URI: https://www.foosales.com … … 12 12 * 13 13 * WC requires at least: 5.0.0 14 * WC tested up to: 7. 7.114 * WC tested up to: 7.8.0 15 15 * 16 16 * Copyright: © 2009-2023 FooSales. … … 20 20 * @package foosales 21 21 */ 22 23 add_action( 24 'before_woocommerce_init', 25 function() { 26 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 27 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 28 } 29 } 30 ); 22 31 23 32 // Define global variables. -
foosales/trunk/helpers/foosales-api-helper.php
r2919862 r2926151 8 8 */ 9 9 10 use Automattic\WooCommerce\Utilities\OrderUtil; 11 10 12 /** 11 13 * Get all tax rates. 12 14 * 13 15 * @since 1.14.0 16 * 17 * @return array 14 18 */ 15 19 function fsfwc_do_get_all_tax_rates() { … … 54 58 * @since 1.18.0 55 59 * @param bool $admin Specify whether the returned result will only be used for display purposes in the admin area. 60 * 61 * @return array 56 62 */ 57 63 function fsfwc_do_get_all_payment_methods( $admin = false ) { … … 90 96 * @since 1.20.0 91 97 * @param string $payment_method_key The FooSales payment method key for which to return the payment method domain. 98 * 99 * @return string 92 100 */ 93 101 function fsfwc_get_wc_payment_method_from_foosales_key( $payment_method_key ) { … … 113 121 * 114 122 * @since 1.14.0 115 * @param WC_Product $ product The WooCommerce product.123 * @param WC_Product $wc_product The WooCommerce product. 116 124 * @param array $args Additional arguments. 117 125 * @param string $type The type of product. 118 */ 119 function fsfwc_get_price_excluding_tax( $product, $args = array(), $type = '' ) { 120 $price = $product->get_price(); 126 * 127 * @return string 128 */ 129 function fsfwc_get_price_excluding_tax( $wc_product, $args = array(), $type = '' ) { 130 $price = $wc_product->get_price(); 121 131 122 132 if ( 'regular' === $type ) { 123 $price = $ product->get_regular_price();133 $price = $wc_product->get_regular_price(); 124 134 } elseif ( 'sale' === $type ) { 125 $price = $ product->get_sale_price();135 $price = $wc_product->get_sale_price(); 126 136 } 127 137 … … 140 150 return ''; 141 151 } elseif ( empty( $qty ) ) { 142 return 0.0;152 return '0.0'; 143 153 } 144 154 145 155 $line_price = $price * $qty; 146 156 147 if ( $ product->is_taxable() && wc_prices_include_tax() ) {148 $tax_rates = WC_Tax::get_rates( $ product->get_tax_class() );149 $base_tax_rates = WC_Tax::get_base_tax_rates( $ product->get_tax_class( 'unfiltered' ) );157 if ( $wc_product->is_taxable() && wc_prices_include_tax() ) { 158 $tax_rates = WC_Tax::get_rates( $wc_product->get_tax_class() ); 159 $base_tax_rates = WC_Tax::get_base_tax_rates( $wc_product->get_tax_class( 'unfiltered' ) ); 150 160 $remove_taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $line_price, $base_tax_rates, true ) : WC_Tax::calc_tax( $line_price, $tax_rates, true ); 151 161 $return_price = $line_price - array_sum( $remove_taxes ); // Unrounded since we're dealing with tax inclusive prices. Matches logic in cart-totals class. @see adjust_non_base_location_price. … … 154 164 } 155 165 156 return apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $ product );166 return apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $wc_product ); 157 167 } 158 168 … … 161 171 * 162 172 * @since 1.14.0 163 * @param WC_Product $ product The WooCommerce product.173 * @param WC_Product $wc_product The WooCommerce product. 164 174 * @param string $type The type of product. 165 */ 166 function fsfwc_get_price_including_tax( $product, $type = '' ) { 167 $price = $product->get_price(); 175 * 176 * @return string 177 */ 178 function fsfwc_get_price_including_tax( $wc_product, $type = '' ) { 179 $price = $wc_product->get_price(); 168 180 169 181 if ( 'regular' === $type ) { 170 $price = $ product->get_regular_price();182 $price = $wc_product->get_regular_price(); 171 183 } elseif ( 'sale' === $type ) { 172 $price = $ product->get_sale_price();184 $price = $wc_product->get_sale_price(); 173 185 } 174 186 … … 178 190 return ''; 179 191 } elseif ( empty( $qty ) ) { 180 return 0.0;192 return '0.0'; 181 193 } 182 194 … … 184 196 $return_price = $line_price; 185 197 186 if ( $ product->is_taxable() ) {198 if ( $wc_product->is_taxable() ) { 187 199 if ( ! wc_prices_include_tax() ) { 188 $tax_rates = WC_Tax::get_rates( $ product->get_tax_class() );200 $tax_rates = WC_Tax::get_rates( $wc_product->get_tax_class() ); 189 201 $taxes = WC_Tax::calc_tax( $line_price, $tax_rates, false ); 190 202 … … 193 205 $return_price = $line_price + $taxes_total; 194 206 } else { 195 $tax_rates = WC_Tax::get_rates( $ product->get_tax_class() );196 $base_tax_rates = WC_Tax::get_base_tax_rates( $ product->get_tax_class( 'unfiltered' ) );207 $tax_rates = WC_Tax::get_rates( $wc_product->get_tax_class() ); 208 $base_tax_rates = WC_Tax::get_base_tax_rates( $wc_product->get_tax_class( 'unfiltered' ) ); 197 209 198 210 /** … … 223 235 } 224 236 } 225 return apply_filters( 'woocommerce_get_price_including_tax', $return_price, $qty, $product ); 237 238 return apply_filters( 'woocommerce_get_price_including_tax', $return_price, $qty, $wc_product ); 226 239 } 227 240 … … 231 244 * @since 1.14.0 232 245 * @param string $payment_method_key The key of the payment method. 246 * 247 * @return string 233 248 */ 234 249 function fsfwc_get_payment_method_from_key( $payment_method_key = '' ) { … … 256 271 * @since 1.14.0 257 272 * @param string $payment_method The payment method. 273 * 274 * @return string 258 275 */ 259 276 function fsfwc_get_payment_method_key_from_value( $payment_method = '' ) { … … 309 326 * @param array $a The one category object to compare. 310 327 * @param array $b The other category object to compare. 328 * 329 * @return bool 311 330 */ 312 331 function fsfwc_do_compare_categories( $a, $b ) { … … 318 337 * 319 338 * @since 1.14.0 339 * 340 * @return array 320 341 */ 321 342 function fsfwc_do_get_all_product_categories() { … … 387 408 * @param int $offset The offset from where to start adding fetched product images. 388 409 * @param string $platform The platform that is currently performing this request. 410 * 411 * @return array 389 412 */ 390 413 function fsfwc_do_get_all_product_images( $offset = 0, $platform = 'any' ) { … … 455 478 $product_image_data['product_images'] = array(); 456 479 457 foreach ( $query->posts as $p ost_id ) {480 foreach ( $query->posts as $product_id ) { 458 481 $product_image = preg_replace_callback( 459 482 '/[^\x20-\x7f]/', … … 461 484 return rawurlencode( $match[0] ); 462 485 }, 463 (string) get_the_post_thumbnail_url( $p ost_id, 'thumbnail' )486 (string) get_the_post_thumbnail_url( $product_id, 'thumbnail' ) 464 487 ); 465 488 466 489 $product_image_data['product_images'][] = array( 467 'pid' => (string) $p ost_id,490 'pid' => (string) $product_id, 468 491 'pi' => $product_image, 469 492 ); … … 485 508 * @param int $offset The offset from where to start adding fetched products. 486 509 * @param string $platform The platform that is currently performing this request. 510 * 511 * @return array 487 512 */ 488 513 function fsfwc_do_get_all_products( $offset = 0, $platform = 'any' ) { … … 563 588 $shop_tax = ( 'yes' === (string) get_option( 'woocommerce_calc_taxes', '' ) ) ? (string) get_option( 'woocommerce_tax_display_shop', '' ) : 'incl'; 564 589 565 foreach ( $query->posts as $p ost_id ) {566 567 $products[] = fsfwc_do_get_single_product( $p ost_id, $wc_tax, $cat_names, $shop_tax, $platform );590 foreach ( $query->posts as $product_id ) { 591 592 $products[] = fsfwc_do_get_single_product( $product_id, $wc_tax, $cat_names, $shop_tax, $platform ); 568 593 569 594 } … … 585 610 * 586 611 * @since 1.14.0 587 * @param int $p ost_id The WordPress post ID.612 * @param int $product_id The WooCommerce product ID. 588 613 * @param WC_Tax $wc_tax The WooCommerce tax object. 589 614 * @param array $cat_names An array of category names to add to the product if it matches. 590 615 * @param string $shop_tax Whether the shop tax is incl or excl. 591 616 * @param string $platform The platform that is currently performing this request. 592 */ 593 function fsfwc_do_get_single_product( $post_id, &$wc_tax, &$cat_names, $shop_tax = 'incl', $platform = 'any' ) { 617 * 618 * @return array 619 */ 620 function fsfwc_do_get_single_product( $product_id, &$wc_tax, &$cat_names, $shop_tax = 'incl', $platform = 'any' ) { 594 621 595 622 global $foosales_products_default_minimum_cart_quantity; … … 599 626 $product_data = array(); 600 627 601 $wc_product = wc_get_product( $p ost_id );628 $wc_product = wc_get_product( $product_id ); 602 629 603 630 $product_data['modified'] = (string) gmdate( 'Y-m-d H:i:s+00:00', strtotime( $wc_product->get_date_modified() ) ); 604 631 605 $product_data['pid'] = (string) $p ost_id;606 $product_data['ppdt'] = (string) get_post_timestamp( $post_id);607 $product_data['sip'] = 'no' === get_post_meta( $post_id,'foosales_product_show_in_pos', true ) ? '0' : '1';608 $product_data['pip'] = 'yes' === get_post_meta( $post_id,'foosales_product_pin_in_pos', true ) ? '1' : '0';609 610 $product_title = (string) htmlspecialchars_decode( get_post_field( 'post_title', $post_id) );632 $product_data['pid'] = (string) $product_id; 633 $product_data['ppdt'] = (string) strtotime( $wc_product->get_date_created() ); 634 $product_data['sip'] = 'no' === $wc_product->get_meta( 'foosales_product_show_in_pos', true ) ? '0' : '1'; 635 $product_data['pip'] = 'yes' === $wc_product->get_meta( 'foosales_product_pin_in_pos', true ) ? '1' : '0'; 636 637 $product_title = (string) htmlspecialchars_decode( $wc_product->get_title() ); 611 638 612 639 $product_data['pt'] = $product_title; … … 633 660 634 661 if ( $use_decimal_quantities ) { 635 $foosales_product_minimum_cart_quantity = get_post_meta( $post_id,'foosales_product_minimum_cart_quantity', true );636 $foosales_product_cart_quantity_step = get_post_meta( $post_id,'foosales_product_cart_quantity_step', true );637 $foosales_product_override_default_cart_quantity_unit = get_post_meta( $post_id,'foosales_product_override_default_cart_quantity_unit', true );638 $foosales_product_cart_quantity_unit = get_post_meta( $post_id,'foosales_product_cart_quantity_unit', true );662 $foosales_product_minimum_cart_quantity = $wc_product->get_meta( 'foosales_product_minimum_cart_quantity', true ); 663 $foosales_product_cart_quantity_step = $wc_product->get_meta( 'foosales_product_cart_quantity_step', true ); 664 $foosales_product_override_default_cart_quantity_unit = $wc_product->get_meta( 'foosales_product_override_default_cart_quantity_unit', true ); 665 $foosales_product_cart_quantity_unit = $wc_product->get_meta( 'foosales_product_cart_quantity_unit', true ); 639 666 640 667 $product_data['mcq'] = (string) ( '' !== $foosales_product_minimum_cart_quantity ? $foosales_product_minimum_cart_quantity : $foosales_products_default_minimum_cart_quantity ); … … 679 706 680 707 $product_variation['pvid'] = (string) $variation_id; 681 $product_variation['sip'] = 'no' === get_post_meta( $variation_id,'foosales_variation_show_in_pos', true ) ? '0' : '1';708 $product_variation['sip'] = 'no' === $wc_product_variation->get_meta( 'foosales_variation_show_in_pos', true ) ? '0' : '1'; 682 709 $product_variation['pt'] = $product_title; 683 710 … … 781 808 $product_data['pv'] = $product_variations; 782 809 783 $wc_product = null;784 785 unset( $wc_product );786 787 810 $product_categories = array(); 788 811 789 $cat_ids = wp_get_post_terms( $post_id, 'product_cat', array( 'fields' => 'ids' ));812 $cat_ids = $wc_product->get_category_ids(); 790 813 791 814 $last_cat_id = end( $cat_ids ); … … 824 847 } 825 848 826 if ( 'Event' === get_post_meta( $post_id,'WooCommerceEventsEvent', true ) && ( is_plugin_active( 'fooevents/fooevents.php' ) || is_plugin_active_for_network( 'fooevents/fooevents.php' ) ) ) {849 if ( 'Event' === $wc_product->get_meta( 'WooCommerceEventsEvent', true ) && ( is_plugin_active( 'fooevents/fooevents.php' ) || is_plugin_active_for_network( 'fooevents/fooevents.php' ) ) ) { 827 850 828 851 $event = array(); 829 852 830 $event['et'] = get_post_meta( $post_id,'WooCommerceEventsType', true );831 832 $fooevents_pos_attendee_details = get_post_meta( $post_id,'WooCommerceEventsPOSAttendeeDetails', true );833 $fooevents_pos_attendee_email = get_post_meta( $post_id,'WooCommerceEventsPOSAttendeeEmail', true );834 $fooevents_pos_attendee_telephone = get_post_meta( $post_id,'WooCommerceEventsPOSAttendeeTelephone', true );835 $fooevents_pos_attendee_company = get_post_meta( $post_id,'WooCommerceEventsPOSAttendeeCompany', true );836 $fooevents_pos_attendee_designation = get_post_meta( $post_id,'WooCommerceEventsPOSAttendeeDesignation', true );837 838 $event['cad'] = '' === $fooevents_pos_attendee_details ? ( get_post_meta( $post_id,'WooCommerceEventsCaptureAttendeeDetails', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_details ? '1' : '0' );839 $event['cae'] = '' === $fooevents_pos_attendee_email ? ( ( get_post_meta( $post_id, 'WooCommerceEventsCaptureAttendeeDetails', true ) === 'on' && get_post_meta( $post_id, 'WooCommerceEventsCaptureAttendeeEmail', true ) === '' ) || get_post_meta( $post_id,'WooCommerceEventsCaptureAttendeeEmail', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_email ? '1' : '0' );840 $event['cat'] = '' === $fooevents_pos_attendee_telephone ? ( get_post_meta( $post_id,'WooCommerceEventsCaptureAttendeeTelephone', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_telephone ? '1' : '0' );841 $event['cac'] = '' === $fooevents_pos_attendee_company ? ( get_post_meta( $post_id,'WooCommerceEventsCaptureAttendeeCompany', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_company ? '1' : '0' );842 $event['cades'] = '' === $fooevents_pos_attendee_designation ? ( get_post_meta( $post_id,'WooCommerceEventsCaptureAttendeeDesignation', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_designation ? '1' : '0' );853 $event['et'] = $wc_product->get_meta( 'WooCommerceEventsType', true ); 854 855 $fooevents_pos_attendee_details = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeDetails', true ); 856 $fooevents_pos_attendee_email = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeEmail', true ); 857 $fooevents_pos_attendee_telephone = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeTelephone', true ); 858 $fooevents_pos_attendee_company = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeCompany', true ); 859 $fooevents_pos_attendee_designation = $wc_product->get_meta( 'WooCommerceEventsPOSAttendeeDesignation', true ); 860 861 $event['cad'] = '' === $fooevents_pos_attendee_details ? ( $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeDetails', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_details ? '1' : '0' ); 862 $event['cae'] = '' === $fooevents_pos_attendee_email ? ( ( $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeDetails', true ) === 'on' && $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeEmail', true ) === '' ) || $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeEmail', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_email ? '1' : '0' ); 863 $event['cat'] = '' === $fooevents_pos_attendee_telephone ? ( $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeTelephone', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_telephone ? '1' : '0' ); 864 $event['cac'] = '' === $fooevents_pos_attendee_company ? ( $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeCompany', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_company ? '1' : '0' ); 865 $event['cades'] = '' === $fooevents_pos_attendee_designation ? ( $wc_product->get_meta( 'WooCommerceEventsCaptureAttendeeDesignation', true ) === 'on' ? '1' : '0' ) : ( 'hide' !== $fooevents_pos_attendee_designation ? '1' : '0' ); 843 866 844 867 $event['rad'] = '' === $fooevents_pos_attendee_details ? $event['cad'] : ( 'required' === $fooevents_pos_attendee_details ? '1' : '0' ); … … 853 876 $fooevents_custom_attendee_fields = new Fooevents_Custom_Attendee_Fields(); 854 877 855 $fooevents_custom_attendee_fields_options_serialized = get_post_meta( $post_id,'fooevents_custom_attendee_fields_options_serialized', true );878 $fooevents_custom_attendee_fields_options_serialized = $wc_product->get_meta( 'fooevents_custom_attendee_fields_options_serialized', true ); 856 879 $fooevents_custom_attendee_fields_options = json_decode( $fooevents_custom_attendee_fields_options_serialized, true ); 857 880 $fooevents_custom_attendee_fields_options = $fooevents_custom_attendee_fields->correct_legacy_options( $fooevents_custom_attendee_fields_options ); … … 873 896 $event['caf'] = $custom_fields; 874 897 875 $event['eoas'] = get_post_meta( $post_id,'WooCommerceEventsAttendeeOverride', true );876 $event['eoap'] = get_post_meta( $post_id,'WooCommerceEventsAttendeeOverridePlural', true );877 $event['eots'] = get_post_meta( $post_id,'WooCommerceEventsTicketOverride', true );878 $event['eotp'] = get_post_meta( $post_id,'WooCommerceEventsTicketOverridePlural', true );879 $event['eods'] = get_post_meta( $post_id,'WooCommerceEventsDayOverride', true );880 $event['eodp'] = get_post_meta( $post_id,'WooCommerceEventsDayOverridePlural', true );881 $event['eobss'] = get_post_meta( $post_id,'WooCommerceEventsBookingsSlotOverride', true );882 $event['eobsp'] = get_post_meta( $post_id,'WooCommerceEventsBookingsSlotOverridePlural', true );883 $event['eobds'] = get_post_meta( $post_id,'WooCommerceEventsBookingsDateOverride', true );884 $event['eobdp'] = get_post_meta( $post_id,'WooCommerceEventsBookingsDateOverridePlural', true );885 $event['eobbds'] = get_post_meta( $post_id,'WooCommerceEventsBookingsBookingDetailsOverride', true );886 $event['eobbdp'] = get_post_meta( $post_id,'WooCommerceEventsBookingsBookingDetailsOverridePlural', true );887 $event['eosr'] = get_post_meta( $post_id,'WooCommerceEventsSeatingRowOverride', true );888 $event['eosrp'] = get_post_meta( $post_id,'WooCommerceEventsSeatingRowOverridePlural', true );889 $event['eoss'] = get_post_meta( $post_id,'WooCommerceEventsSeatingSeatOverride', true );890 $event['eossp'] = get_post_meta( $post_id,'WooCommerceEventsSeatingSeatOverridePlural', true );891 $event['eossc'] = get_post_meta( $post_id,'WooCommerceEventsSeatingSeatingChartOverride', true );892 $event['eosscp'] = get_post_meta( $post_id,'WooCommerceEventsSeatingSeatingChartOverridePlural', true );893 $event['eosf'] = get_post_meta( $post_id,'WooCommerceEventsSeatingFrontOverride', true );894 $event['eosfp'] = get_post_meta( $post_id,'WooCommerceEventsSeatingFrontOverridePlural', true );895 896 $event['eue'] = 'on' === get_post_meta( $post_id,'WooCommerceEventsUniqueEmail', true ) ? '1' : '0';898 $event['eoas'] = $wc_product->get_meta( 'WooCommerceEventsAttendeeOverride', true ); 899 $event['eoap'] = $wc_product->get_meta( 'WooCommerceEventsAttendeeOverridePlural', true ); 900 $event['eots'] = $wc_product->get_meta( 'WooCommerceEventsTicketOverride', true ); 901 $event['eotp'] = $wc_product->get_meta( 'WooCommerceEventsTicketOverridePlural', true ); 902 $event['eods'] = $wc_product->get_meta( 'WooCommerceEventsDayOverride', true ); 903 $event['eodp'] = $wc_product->get_meta( 'WooCommerceEventsDayOverridePlural', true ); 904 $event['eobss'] = $wc_product->get_meta( 'WooCommerceEventsBookingsSlotOverride', true ); 905 $event['eobsp'] = $wc_product->get_meta( 'WooCommerceEventsBookingsSlotOverridePlural', true ); 906 $event['eobds'] = $wc_product->get_meta( 'WooCommerceEventsBookingsDateOverride', true ); 907 $event['eobdp'] = $wc_product->get_meta( 'WooCommerceEventsBookingsDateOverridePlural', true ); 908 $event['eobbds'] = $wc_product->get_meta( 'WooCommerceEventsBookingsBookingDetailsOverride', true ); 909 $event['eobbdp'] = $wc_product->get_meta( 'WooCommerceEventsBookingsBookingDetailsOverridePlural', true ); 910 $event['eosr'] = $wc_product->get_meta( 'WooCommerceEventsSeatingRowOverride', true ); 911 $event['eosrp'] = $wc_product->get_meta( 'WooCommerceEventsSeatingRowOverridePlural', true ); 912 $event['eoss'] = $wc_product->get_meta( 'WooCommerceEventsSeatingSeatOverride', true ); 913 $event['eossp'] = $wc_product->get_meta( 'WooCommerceEventsSeatingSeatOverridePlural', true ); 914 $event['eossc'] = $wc_product->get_meta( 'WooCommerceEventsSeatingSeatingChartOverride', true ); 915 $event['eosscp'] = $wc_product->get_meta( 'WooCommerceEventsSeatingSeatingChartOverridePlural', true ); 916 $event['eosf'] = $wc_product->get_meta( 'WooCommerceEventsSeatingFrontOverride', true ); 917 $event['eosfp'] = $wc_product->get_meta( 'WooCommerceEventsSeatingFrontOverridePlural', true ); 918 919 $event['eue'] = 'on' === $wc_product->get_meta( 'WooCommerceEventsUniqueEmail', true ) ? '1' : '0'; 897 920 898 921 $event['info'] = array(); 899 922 900 $event_info_orig = get_fooevents_event_info( get_post( $p ost_id ) );923 $event_info_orig = get_fooevents_event_info( get_post( $product_id ) ); 901 924 902 925 $exclude_array = array( … … 957 980 * @param int $offset The offset from where to start adding fetched orders. 958 981 * @param string $platform The platform that is currently performing this request. 982 * 983 * @return array 959 984 */ 960 985 function fsfwc_do_get_all_orders( $offset = 0, $platform = 'any' ) { … … 976 1001 977 1002 $args = array( 978 'posts_per_page' => -1, 979 'post_type' => 'shop_order', 980 'post_status' => $order_load_statuses, 981 'fields' => 'ids', 982 'no_found_rows' => true, 983 'orderby' => 'id', 984 'order' => 'DESC', 1003 'limit' => -1, 1004 'type' => 'shop_order', 1005 'status' => $order_load_statuses, 1006 'return' => 'ids', 1007 'orderby' => 'ID', 985 1008 ); 986 1009 987 $ query = new WP_Query( $args );1010 $order_ids = wc_get_orders( $args ); 988 1011 989 1012 $args = null; … … 991 1014 unset( $args ); 992 1015 993 $total_orders = $query->post_count;1016 $total_orders = count( $order_ids ); 994 1017 995 1018 $orders_to_load = (int) get_option( 'globalFooSalesOrdersToLoad', '100' ); … … 1014 1037 $order_count = 0; 1015 1038 1016 foreach ( $ query->posts as $post_id ) {1039 foreach ( $order_ids as $order_id ) { 1017 1040 1018 1041 $order_count++; … … 1022 1045 } 1023 1046 1024 $wc_order = wc_get_order( $ post_id );1047 $wc_order = wc_get_order( $order_id ); 1025 1048 1026 1049 $order_data['orders'][] = fsfwc_do_get_single_order( $wc_order, $platform ); … … 1034 1057 } 1035 1058 } 1036 1037 $query = null;1038 1039 unset( $query );1040 1059 1041 1060 return $order_data; … … 1049 1068 * @param int $offset The offset from where to start adding fetched customers. 1050 1069 * @param string $platform The platform that is currently performing this request. 1070 * 1071 * @return array 1051 1072 */ 1052 1073 function fsfwc_do_get_all_customers( $offset = 0, $platform = 'any' ) { … … 1171 1192 * @param string $chunk The specific chunk of data to fetch. 1172 1193 * @param string $platform The platform that is currently performing this request. 1194 * 1195 * @return array 1173 1196 */ 1174 1197 function fsfwc_fetch_chunk( $user, $chunk, $platform = 'any' ) { … … 1431 1454 * @param array $product_params Key/value pairs of product data to update. 1432 1455 * @param string $platform The platform that is currently performing this request. 1456 * 1457 * @return array 1433 1458 */ 1434 1459 function fsfwc_do_update_product( $product_params, $platform = 'any' ) { … … 1440 1465 1441 1466 if ( null === $wc_product || false === $wc_product ) { 1442 return false;1467 return array(); 1443 1468 } 1444 1469 … … 1489 1514 ob_end_clean(); 1490 1515 } catch ( Exception $e ) { 1491 return false;1516 return array(); 1492 1517 } 1493 1518 … … 1518 1543 * @param array $order_data Key/value pairs containing order data needed to create a new WooCommerce order. 1519 1544 * @param string $platform The platform that is currently performing this request. 1545 * 1546 * @return WC_Order 1520 1547 */ 1521 1548 function fsfwc_do_create_update_order( $order_data, $platform = 'any' ) { … … 1568 1595 $existing_order_id = $order_data[13]; 1569 1596 1570 $ order = ! empty( $existing_order_id ) ? wc_get_order( $existing_order_id ) : wc_create_order();1597 $wc_order = ! empty( $existing_order_id ) ? wc_get_order( $existing_order_id ) : wc_create_order(); 1571 1598 1572 1599 $updated_values = array(); 1573 1600 1574 update_post_meta( $order->get_id(),'_foosales_order_source', 'foosales_app' );1601 $wc_order->update_meta_data( '_foosales_order_source', 'foosales_app' ); 1575 1602 1576 1603 // Order date. 1577 1604 if ( ! empty( $order_date ) ) { 1578 $order->set_date_created( (int) $order_date ); 1579 1580 wp_update_post( 1581 array( 1582 'ID' => $order->get_id(), 1583 'post_date' => gmdate( 'Y-m-d H:i:s+00:00', (int) $order_date ), 1584 ) 1585 ); 1605 $wc_order->set_date_created( (int) $order_date ); 1586 1606 1587 1607 $updated_values[] = $foosales_phrases['text_order_update_date']; … … 1590 1610 // Payment method. 1591 1611 if ( ! empty( $payment_method_key ) ) { 1592 $changed_foosales_payment_method = update_post_meta( $order->get_id(),'_foosales_payment_method', $payment_method_key );1593 1594 $ order->set_payment_method( fsfwc_get_wc_payment_method_from_foosales_key( $payment_method_key ) );1612 $changed_foosales_payment_method = $wc_order->update_meta_data( '_foosales_payment_method', $payment_method_key ); 1613 1614 $wc_order->set_payment_method( fsfwc_get_wc_payment_method_from_foosales_key( $payment_method_key ) ); 1595 1615 1596 1616 $payment_method = fsfwc_get_payment_method_from_key( $payment_method_key ); 1597 1617 1598 $ order->set_payment_method_title( $payment_method );1599 1600 update_post_meta( $order->get_id(),$foosales_phrases['meta_key_order_payment_method'], $payment_method );1618 $wc_order->set_payment_method_title( $payment_method ); 1619 1620 $wc_order->update_meta_data( $foosales_phrases['meta_key_order_payment_method'], $payment_method ); 1601 1621 1602 1622 if ( false !== $changed_foosales_payment_method ) { … … 1617 1637 ) ) { 1618 1638 1619 $changed_foosales_square_order_id = update_post_meta( $order->get_id(),'_foosales_square_order_id', $square_order_id );1639 $changed_foosales_square_order_id = $wc_order->update_meta_data( '_foosales_square_order_id', $square_order_id ); 1620 1640 1621 1641 $square_order_result = fsfwc_get_square_order( $square_order_id ); … … 1627 1647 if ( ! empty( $square_order['tenders'] ) && count( $square_order['tenders'] ) === 1 ) { 1628 1648 1629 update_post_meta( $order->get_id(),'_foosales_square_order_auto_refund', '1' );1649 $changed_foosales_square_order_id = $wc_order->update_meta_data( '_foosales_square_order_auto_refund', '1' ); 1630 1650 1631 1651 } … … 1649 1669 true 1650 1670 ) ) { 1651 $changed_foosales_stripe_payment_id = update_post_meta( $order->get_id(),'_foosales_stripe_payment_id', $stripe_payment_id );1671 $changed_foosales_stripe_payment_id = $wc_order->update_meta_data( '_foosales_stripe_payment_id', $stripe_payment_id ); 1652 1672 1653 1673 if ( false !== $changed_foosales_stripe_payment_id ) { … … 1658 1678 // User ID. 1659 1679 if ( ! empty( $user_id ) && (int) $user_id > 0 ) { 1660 $changed_foosales_user_id = update_post_meta( $order->get_id(),'_foosales_user_id', $user_id );1680 $changed_foosales_user_id = $wc_order->update_meta_data( '_foosales_user_id', $user_id ); 1661 1681 1662 1682 if ( false !== $changed_foosales_user_id ) { … … 1682 1702 if ( ! empty( $existing_order_id ) && ! empty( $order_items ) ) { 1683 1703 // First remove all items before adding new items. 1684 $wc_order_items = $ order->get_items();1704 $wc_order_items = $wc_order->get_items(); 1685 1705 1686 1706 foreach ( $wc_order_items as $wc_order_item ) { … … 1691 1711 } 1692 1712 1693 $wc_product = wc_get_product( $product_variation_id );1694 1695 if ( false !== $wc_product && $wc_product->get_manage_stock() ) {1696 wc_update_product_stock( $wc_product , $wc_order_item->get_quantity(), 'increase' );1697 } 1698 1699 $wc_product = null;1700 1701 unset( $wc_product );1702 1703 $ order->remove_item( $wc_order_item->get_id() );1713 $wc_product_variation = wc_get_product( $product_variation_id ); 1714 1715 if ( false !== $wc_product_variation && $wc_product_variation->get_manage_stock() ) { 1716 wc_update_product_stock( $wc_product_variation, $wc_order_item->get_quantity(), 'increase' ); 1717 } 1718 1719 $wc_product_variation = null; 1720 1721 unset( $wc_product_variation ); 1722 1723 $wc_order->remove_item( $wc_order_item->get_id() ); 1704 1724 1705 1725 if ( false === in_array( $product_variation_id, $updated_product_ids, true ) ) { … … 1713 1733 } 1714 1734 1715 $ order->{'product_updates'} = wp_json_encode( $product_updates );1735 $wc_order->{'product_updates'} = wp_json_encode( $product_updates ); 1716 1736 1717 1737 foreach ( $order_items as $order_item ) { … … 1732 1752 } 1733 1753 1734 if ( 'Event' === get_post_meta( $event_product_id, 'WooCommerceEventsEvent', true ) ) { 1754 $event_product = wc_get_product( $event_product_id ); 1755 1756 if ( 'Event' === $event_product->get_meta( 'WooCommerceEventsEvent', true ) ) { 1735 1757 $order_has_event = true; 1736 1758 1737 $event_type = get_post_meta( $event_product_id,'WooCommerceEventsType', true );1759 $event_type = $event_product->get_meta( 'WooCommerceEventsType', true ); 1738 1760 1739 1761 if ( ! isset( $analytics_event_info[ $event_type . '_event_tickets' ] ) ) { … … 1762 1784 } 1763 1785 1764 $ order->add_product( $wc_product, $order_item['oiq'], $product_args );1786 $wc_order->add_product( $wc_product, $order_item['oiq'], $product_args ); 1765 1787 1766 1788 if ( ! empty( $existing_order_id ) ) { … … 1826 1848 } 1827 1849 1828 $changed_foosales_customer_id = (int) $ order->get_customer_id() !== (int) $order_customer['cid'];1829 1830 $ order->set_customer_id( (int) $order_customer['cid'] );1850 $changed_foosales_customer_id = (int) $wc_order->get_customer_id() !== (int) $order_customer['cid']; 1851 1852 $wc_order->set_customer_id( (int) $order_customer['cid'] ); 1831 1853 1832 1854 if ( trim( $order_customer['cbfn'] ) !== '' ) { 1833 $ order->set_billing_first_name( $order_customer['cbfn'] );1855 $wc_order->set_billing_first_name( $order_customer['cbfn'] ); 1834 1856 } else { 1835 $ order->set_billing_first_name( $order_customer['cfn'] );1857 $wc_order->set_billing_first_name( $order_customer['cfn'] ); 1836 1858 } 1837 1859 1838 1860 if ( trim( $order_customer['cbln'] ) !== '' ) { 1839 $ order->set_billing_last_name( $order_customer['cbln'] );1861 $wc_order->set_billing_last_name( $order_customer['cbln'] ); 1840 1862 } else { 1841 $ order->set_billing_last_name( $order_customer['cln'] );1842 } 1843 1844 $ order->set_billing_company( $order_customer['cbco'] );1845 $ order->set_billing_address_1( $order_customer['cba1'] );1846 $ order->set_billing_address_2( $order_customer['cba2'] );1847 $ order->set_billing_city( $order_customer['cbc'] );1848 $ order->set_billing_postcode( $order_customer['cbpo'] );1849 $ order->set_billing_country( $order_customer['cbcu'] );1850 $ order->set_billing_state( $order_customer['cbs'] );1851 $ order->set_billing_phone( $order_customer['cbph'] );1852 $ order->set_billing_email( $order_customer['cbe'] );1853 1854 $ order->set_shipping_first_name( $order_customer['csfn'] );1855 $ order->set_shipping_last_name( $order_customer['csln'] );1856 $ order->set_shipping_company( $order_customer['csco'] );1857 $ order->set_shipping_address_1( $order_customer['csa1'] );1858 $ order->set_shipping_address_2( $order_customer['csa2'] );1859 $ order->set_shipping_city( $order_customer['csc'] );1860 $ order->set_shipping_postcode( $order_customer['cspo'] );1861 $ order->set_shipping_country( $order_customer['cscu'] );1862 $ order->set_shipping_state( $order_customer['css'] );1863 $wc_order->set_billing_last_name( $order_customer['cln'] ); 1864 } 1865 1866 $wc_order->set_billing_company( $order_customer['cbco'] ); 1867 $wc_order->set_billing_address_1( $order_customer['cba1'] ); 1868 $wc_order->set_billing_address_2( $order_customer['cba2'] ); 1869 $wc_order->set_billing_city( $order_customer['cbc'] ); 1870 $wc_order->set_billing_postcode( $order_customer['cbpo'] ); 1871 $wc_order->set_billing_country( $order_customer['cbcu'] ); 1872 $wc_order->set_billing_state( $order_customer['cbs'] ); 1873 $wc_order->set_billing_phone( $order_customer['cbph'] ); 1874 $wc_order->set_billing_email( $order_customer['cbe'] ); 1875 1876 $wc_order->set_shipping_first_name( $order_customer['csfn'] ); 1877 $wc_order->set_shipping_last_name( $order_customer['csln'] ); 1878 $wc_order->set_shipping_company( $order_customer['csco'] ); 1879 $wc_order->set_shipping_address_1( $order_customer['csa1'] ); 1880 $wc_order->set_shipping_address_2( $order_customer['csa2'] ); 1881 $wc_order->set_shipping_city( $order_customer['csc'] ); 1882 $wc_order->set_shipping_postcode( $order_customer['cspo'] ); 1883 $wc_order->set_shipping_country( $order_customer['cscu'] ); 1884 $wc_order->set_shipping_state( $order_customer['css'] ); 1863 1885 1864 1886 if ( false !== $changed_foosales_customer_id ) { … … 1867 1889 } 1868 1890 1869 $ order->calculate_totals();1891 $wc_order->calculate_totals(); 1870 1892 1871 1893 if ( ! empty( $coupons ) ) { 1872 1894 foreach ( $coupons as $coupon ) { 1873 $ order->apply_coupon( new WC_Coupon( $coupon ) );1895 $wc_order->apply_coupon( new WC_Coupon( $coupon ) ); 1874 1896 } 1875 1897 } 1876 1898 1877 1899 if ( '' !== $order_note ) { 1878 $ order->add_order_note( $order_note, $order_note_send_to_customer );1900 $wc_order->add_order_note( $order_note, $order_note_send_to_customer ); 1879 1901 } 1880 1902 … … 1882 1904 1883 1905 ob_start(); 1884 $ order->save();1906 $wc_order->save(); 1885 1907 ob_end_clean(); 1886 1908 … … 1899 1921 $fooevents_checkout_helper = new FooEvents_Checkout_Helper( $fooevents_config ); 1900 1922 1901 $fooevents_checkout_helper->woocommerce_events_process( $ order->get_id() );1923 $fooevents_checkout_helper->woocommerce_events_process( $wc_order->get_id() ); 1902 1924 } 1903 1925 … … 1911 1933 } 1912 1934 1913 $ order->set_status( $order_status );1935 $wc_order->set_status( $order_status ); 1914 1936 1915 1937 if ( ! empty( $existing_order_id ) ) { … … 1917 1939 } 1918 1940 } elseif ( empty( $existing_order_id ) ) { 1919 $ order->set_status( 'completed' );1941 $wc_order->set_status( 'completed' ); 1920 1942 } 1921 1943 … … 1929 1951 $foosales_user_display_name = $foosales_user->display_name; 1930 1952 1931 $ order->add_order_note( sprintf( $foosales_phrases['text_order_updated_via_foosales'], $foosales_user_display_name, "\n- " . implode( "\n- ", $updated_values ) ) );1953 $wc_order->add_order_note( sprintf( $foosales_phrases['text_order_updated_via_foosales'], $foosales_user_display_name, "\n- " . implode( "\n- ", $updated_values ) ) ); 1932 1954 } 1933 1955 } … … 1935 1957 1936 1958 ob_start(); 1937 $ order->save();1959 $wc_order->save(); 1938 1960 ob_end_clean(); 1939 1961 … … 1946 1968 $analytics['total_items'] = $analytics_total_items; 1947 1969 $analytics['payment_method'] = $payment_method_key; 1948 $analytics['total'] = $ order->get_total();1970 $analytics['total'] = $wc_order->get_total(); 1949 1971 1950 1972 $woocommerce_onboarding_profile = get_option( 'woocommerce_onboarding_profile', array() ); … … 1980 2002 } 1981 2003 1982 return $ order;2004 return $wc_order; 1983 2005 } 1984 2006 … … 1990 2012 * @param string $platform The platform that is currently performing this request. 1991 2013 * @param bool $get_product_updates Get the latest information for products in this order. 2014 * 2015 * @return array 1992 2016 */ 1993 2017 function fsfwc_do_get_single_order( &$wc_order, $platform = 'any', $get_product_updates = false ) { … … 2037 2061 unset( $tax_lines, $tax_totals ); 2038 2062 2039 $payment_method_key = (string) get_post_meta( $wc_order->get_id(),'_foosales_payment_method', true );2063 $payment_method_key = (string) $wc_order->get_meta( '_foosales_payment_method', true ); 2040 2064 2041 2065 if ( '' === $payment_method_key ) { 2042 2066 2043 $payment_method = (string) get_post_meta( $wc_order->get_id(),$foosales_phrases['meta_key_order_payment_method'], true );2067 $payment_method = (string) $wc_order->get_meta( $foosales_phrases['meta_key_order_payment_method'], true ); 2044 2068 2045 2069 if ( '' === $payment_method ) { 2046 $payment_method = (string) get_post_meta( $wc_order->get_id(),'Order Payment Method', true );2070 $payment_method = (string) $wc_order->get_meta( 'Order Payment Method', true ); 2047 2071 } 2048 2072 … … 2053 2077 unset( $payment_method ); 2054 2078 2055 update_post_meta( $wc_order->get_id(), '_foosales_payment_method', $payment_method_key ); 2079 $wc_order->update_meta_data( '_foosales_payment_method', $payment_method_key ); 2080 $wc_order->save(); 2056 2081 2057 2082 } elseif ( 'foosales_square' === $payment_method_key ) { … … 2059 2084 $payment_method_key = 'foosales_square_reader'; 2060 2085 2061 update_post_meta( $wc_order->get_id(), '_foosales_payment_method', $payment_method_key ); 2086 $wc_order->update_meta_data( '_foosales_payment_method', $payment_method_key ); 2087 $wc_order->save(); 2062 2088 2063 2089 } … … 2065 2091 $single_order['opmk'] = '' === $payment_method_key ? 'foosales_other' : $payment_method_key; 2066 2092 2067 $order_source = (string) get_post_meta( $wc_order->get_id(),'_foosales_order_source', true );2093 $order_source = (string) $wc_order->get_meta( '_foosales_order_source', true ); 2068 2094 2069 2095 $customer_order_notes = array_reverse( $wc_order->get_customer_order_notes() ); … … 2080 2106 $single_order['fo'] = 'foosales_app' === $order_source ? '1' : '0'; 2081 2107 2082 $single_order['soid'] = (string) get_post_meta( $wc_order->get_id(),'_foosales_square_order_id', true );2083 $single_order['spid'] = (string) get_post_meta( $wc_order->get_id(),'_foosales_stripe_payment_id', true );2084 $single_order['oud'] = (string) get_post_meta( $wc_order->get_id(),'_foosales_user_id', true );2108 $single_order['soid'] = (string) $wc_order->get_meta( '_foosales_square_order_id', true ); 2109 $single_order['spid'] = (string) $wc_order->get_meta( '_foosales_stripe_payment_id', true ); 2110 $single_order['oud'] = (string) $wc_order->get_meta( '_foosales_user_id', true ); 2085 2111 2086 2112 $payment_method_key = null; … … 2302 2328 $single_order['ocl'] = $coupon_lines; 2303 2329 2304 $single_order['etg'] = '' !== get_post_meta( $wc_order->get_id(),'WooCommerceEventsTicketsGenerated', true ) ? '1' : '0';2330 $single_order['etg'] = '' !== $wc_order->get_meta( 'WooCommerceEventsTicketsGenerated', true ) ? '1' : '0'; 2305 2331 2306 2332 $woocommerce_events_order_tickets = array(); … … 2327 2353 $woocommerce_events_order_tickets = $fooevents_orders_helper->process_event_tickets_for_display( $event_tickets ); 2328 2354 } else { 2329 $woocommerce_events_order_tickets = get_post_meta( $wc_order->get_id(),'WooCommerceEventsOrderTickets', true );2355 $woocommerce_events_order_tickets = $wc_order->get_meta( 'WooCommerceEventsOrderTickets', true ); 2330 2356 $woocommerce_events_order_tickets = '' !== $woocommerce_events_order_tickets ? $fooevents_orders_helper->process_order_tickets_for_display( $woocommerce_events_order_tickets ) : array(); 2331 2357 } … … 2362 2388 $update_product_params = $offline_change['update_product']['FooSalesProductParams']; 2363 2389 2364 fsfwc_do_update_product( json_decode( $update_product_params, true ), $platform );2390 $result = fsfwc_do_update_product( json_decode( $update_product_params, true ), $platform ); 2365 2391 2366 2392 $response = array(); 2367 2393 2368 $response['ocid'] = $offline_change['update_product']['ocid']; 2394 if ( ! empty( $result ) ) { 2395 $response['ocid'] = $offline_change['update_product']['ocid']; 2396 } 2369 2397 2370 2398 echo wp_json_encode( $response ); … … 2482 2510 } 2483 2511 2484 $refund_result = fsfwc_do_refund_order( $order_id, $refunded_items ); 2485 $refunded_order = $refund_result['order']; 2512 $refund_result = fsfwc_do_refund_order( $order_id, $refunded_items ); 2486 2513 2487 2514 $response = array(); … … 2518 2545 * @param boolean $restock Whether or not the items should be restocked. 2519 2546 * @param string $platform The platform that is currently performing this request. 2547 * 2548 * @return bool 2520 2549 */ 2521 2550 function fsfwc_do_cancel_order( $order_id, $restock, $platform = 'any' ) { … … 2576 2605 * @param array $refunded_items Items to be refunded. 2577 2606 * @param string $platform The platform that is currently performing this request. 2607 * 2608 * @return array 2578 2609 */ 2579 2610 function fsfwc_do_refund_order( $order_id, $refunded_items, $platform = 'any' ) { … … 2649 2680 } 2650 2681 2651 $payment_method_key = get_post_meta( $order_id,'_foosales_payment_method', true );2682 $payment_method_key = $wc_order->get_meta( '_foosales_payment_method', true ); 2652 2683 2653 2684 $result = array(); … … 2664 2695 ) ) { 2665 2696 2666 $square_order_auto_refund = get_post_meta( $order_id,'_foosales_square_order_auto_refund', true ) === '1';2697 $square_order_auto_refund = $wc_order->get_meta( '_foosales_square_order_auto_refund', true ) === '1'; 2667 2698 2668 2699 if ( $square_order_auto_refund ) { 2669 2700 2670 $square_order_id = get_post_meta( $order_id,'_foosales_square_order_id', true );2701 $square_order_id = $wc_order->get_meta( '_foosales_square_order_id', true ); 2671 2702 2672 2703 $refund_result = fsfwc_refund_square_order( $square_order_id, $refund_total, $platform ); … … 2726 2757 true 2727 2758 ) ) { 2728 $stripe_payment_id = get_post_meta( $order_id,'_foosales_stripe_payment_id', true );2759 $stripe_payment_id = $wc_order->get_meta( '_foosales_stripe_payment_id', true ); 2729 2760 2730 2761 $refund_result = fsfwc_refund_stripe_payment( $stripe_payment_id, $refund_total ); … … 2747 2778 * @param array $customer_details Key/value pairs of customer data to create or update a customer. 2748 2779 * @param string $platform The platform that is currently performing this request. 2780 * 2781 * @return array 2749 2782 */ 2750 2783 function fsfwc_do_create_update_customer( $customer_details = array(), $platform = 'any' ) { … … 2842 2875 * @param array $order_customer The cart customer which will be used to obtain the discounts. 2843 2876 * @param string $platform The platform that is currently performing this request. 2877 * 2878 * @return array 2844 2879 */ 2845 2880 function fsfwc_do_get_coupon_code_discounts( $coupons = array(), $order_items = array(), $order_customer = array(), $platform = 'any' ) { … … 2853 2888 WC()->cart = new WC_Cart(); 2854 2889 2855 $ order = wc_create_order();2890 $wc_order = wc_create_order(); 2856 2891 2857 2892 // Order customer. … … 2891 2926 WC()->customer->set_shipping_state( $order_customer['css'] ); 2892 2927 2893 $ order->set_customer_id( (int) $order_customer['cid'] );2928 $wc_order->set_customer_id( (int) $order_customer['cid'] ); 2894 2929 2895 2930 if ( trim( $order_customer['cbfn'] ) !== '' ) { 2896 $ order->set_billing_first_name( $order_customer['cbfn'] );2931 $wc_order->set_billing_first_name( $order_customer['cbfn'] ); 2897 2932 } else { 2898 $ order->set_billing_first_name( $order_customer['cfn'] );2933 $wc_order->set_billing_first_name( $order_customer['cfn'] ); 2899 2934 } 2900 2935 2901 2936 if ( trim( $order_customer['cbln'] ) !== '' ) { 2902 $ order->set_billing_last_name( $order_customer['cbln'] );2937 $wc_order->set_billing_last_name( $order_customer['cbln'] ); 2903 2938 } else { 2904 $ order->set_billing_last_name( $order_customer['cln'] );2905 } 2906 2907 $ order->set_billing_company( $order_customer['cbco'] );2908 $ order->set_billing_address_1( $order_customer['cba1'] );2909 $ order->set_billing_address_2( $order_customer['cba2'] );2910 $ order->set_billing_city( $order_customer['cbc'] );2911 $ order->set_billing_postcode( $order_customer['cbpo'] );2912 $ order->set_billing_country( $order_customer['cbcu'] );2913 $ order->set_billing_state( $order_customer['cbs'] );2914 $ order->set_billing_phone( $order_customer['cbph'] );2915 $ order->set_billing_email( $order_customer['cbe'] );2916 2917 $ order->set_shipping_first_name( $order_customer['csfn'] );2918 $ order->set_shipping_last_name( $order_customer['csln'] );2919 $ order->set_shipping_company( $order_customer['csco'] );2920 $ order->set_shipping_address_1( $order_customer['csa1'] );2921 $ order->set_shipping_address_2( $order_customer['csa2'] );2922 $ order->set_shipping_city( $order_customer['csc'] );2923 $ order->set_shipping_postcode( $order_customer['cspo'] );2924 $ order->set_shipping_country( $order_customer['cscu'] );2925 $ order->set_shipping_state( $order_customer['css'] );2939 $wc_order->set_billing_last_name( $order_customer['cln'] ); 2940 } 2941 2942 $wc_order->set_billing_company( $order_customer['cbco'] ); 2943 $wc_order->set_billing_address_1( $order_customer['cba1'] ); 2944 $wc_order->set_billing_address_2( $order_customer['cba2'] ); 2945 $wc_order->set_billing_city( $order_customer['cbc'] ); 2946 $wc_order->set_billing_postcode( $order_customer['cbpo'] ); 2947 $wc_order->set_billing_country( $order_customer['cbcu'] ); 2948 $wc_order->set_billing_state( $order_customer['cbs'] ); 2949 $wc_order->set_billing_phone( $order_customer['cbph'] ); 2950 $wc_order->set_billing_email( $order_customer['cbe'] ); 2951 2952 $wc_order->set_shipping_first_name( $order_customer['csfn'] ); 2953 $wc_order->set_shipping_last_name( $order_customer['csln'] ); 2954 $wc_order->set_shipping_company( $order_customer['csco'] ); 2955 $wc_order->set_shipping_address_1( $order_customer['csa1'] ); 2956 $wc_order->set_shipping_address_2( $order_customer['csa2'] ); 2957 $wc_order->set_shipping_city( $order_customer['csc'] ); 2958 $wc_order->set_shipping_postcode( $order_customer['cspo'] ); 2959 $wc_order->set_shipping_country( $order_customer['cscu'] ); 2960 $wc_order->set_shipping_state( $order_customer['css'] ); 2926 2961 } 2927 2962 2928 2963 // Order date. 2929 wp_update_post( 2930 array( 2931 'ID' => $order->get_id(), 2932 'post_date' => gmdate( 'Y-m-d H:i:s+00:00', time() ), 2933 ) 2934 ); 2964 $wc_order->set_date_created( time() ); 2935 2965 2936 2966 // Order items. … … 2947 2977 $wc_product = wc_get_product( $order_item['pid'] ); 2948 2978 2949 $ order->add_product( $wc_product, $order_item['oiq'], $product_args );2979 $wc_order->add_product( $wc_product, $order_item['oiq'], $product_args ); 2950 2980 2951 2981 $product_args = null; … … 2954 2984 } 2955 2985 2956 $ order->calculate_totals();2986 $wc_order->calculate_totals(); 2957 2987 2958 2988 if ( ! empty( $coupons ) ) { 2959 2989 foreach ( $coupons as $coupon ) { 2960 $coupon_result = $ order->apply_coupon( new WC_Coupon( $coupon ) );2990 $coupon_result = $wc_order->apply_coupon( new WC_Coupon( $coupon ) ); 2961 2991 2962 2992 if ( is_wp_error( $coupon_result ) ) { 2963 $ order->delete( true );2993 $wc_order->delete( true ); 2964 2994 2965 2995 $output['message'] = html_entity_decode( wp_strip_all_tags( $coupon_result->get_error_message() ) ); … … 2971 3001 2972 3002 $output['status'] = 'success'; 2973 $output['discounted_order'] = fsfwc_do_get_single_order( $ order, $platform );3003 $output['discounted_order'] = fsfwc_do_get_single_order( $wc_order, $platform ); 2974 3004 2975 3005 $output['discounts'] = array(); 2976 3006 2977 $coupons = $ order->get_items( 'coupon' );3007 $coupons = $wc_order->get_items( 'coupon' ); 2978 3008 2979 3009 if ( ! empty( $coupons ) ) { … … 2985 3015 ); 2986 3016 2987 $coupon_result = $ order->remove_coupon( $coupon->get_code() );3017 $coupon_result = $wc_order->remove_coupon( $coupon->get_code() ); 2988 3018 } 2989 3019 } … … 2992 3022 WC()->cart->empty_cart(); 2993 3023 2994 $ order->delete( true );2995 2996 $ order = null;2997 2998 unset( $ order );3024 $wc_order->delete( true ); 3025 3026 $wc_order = null; 3027 3028 unset( $wc_order ); 2999 3029 3000 3030 return $output; … … 3009 3039 * @param int $last_checked_timestamp The timestamp of the last time updates were fetched by the app. 3010 3040 * @param string $platform The platform that is currently performing this request. 3041 * 3042 * @return array 3011 3043 */ 3012 3044 function fsfwc_do_get_data_updates( $last_checked_timestamp = 0, $platform = 'any' ) { … … 3043 3075 3044 3076 $order_args = array( 3045 'posts_per_page' => -1, 3046 'post_type' => 'shop_order', 3047 'post_status' => $order_load_statuses, 3048 'date_query' => array( 3049 'column' => 'post_modified', 3050 'after' => gmdate( 'Y-m-d H:i:s+00:00', $last_checked_timestamp ), 3051 ), 3052 'fields' => 'ids', 3053 'no_found_rows' => true, 3054 'orderby' => 'id', 3055 'order' => 'DESC', 3077 'limit' => -1, 3078 'type' => 'shop_order', 3079 'status' => $order_load_statuses, 3080 'date_modified' => '>' . $last_checked_timestamp, 3081 'return' => 'ids', 3082 'orderby' => 'ID', 3056 3083 ); 3057 3084 3058 $order_ query = new WP_Query( $order_args );3085 $order_ids = wc_get_orders( $order_args ); 3059 3086 3060 3087 $order_updates = array(); 3061 3088 3062 foreach ( $order_ query->posts as $post_id ) {3063 3064 $wc_order = wc_get_order( $ post_id );3089 foreach ( $order_ids as $order_id ) { 3090 3091 $wc_order = wc_get_order( $order_id ); 3065 3092 3066 3093 $updated_order = fsfwc_do_get_single_order( $wc_order, $platform ); … … 3127 3154 $updated_order_product_ids = array_unique( array_merge( $products_query->posts, $updated_order_product_ids ) ); 3128 3155 3129 foreach ( $updated_order_product_ids as $p ost_id ) {3156 foreach ( $updated_order_product_ids as $product_id ) { 3130 3157 3131 3158 if ( 'ios' === $platform || 'android' === $platform || 'web' === $platform ) { … … 3139 3166 } 3140 3167 3141 $updated_product = fsfwc_do_get_single_product( $p ost_id, $wc_tax, $cat_names, $shop_tax, $platform );3168 $updated_product = fsfwc_do_get_single_product( $product_id, $wc_tax, $cat_names, $shop_tax, $platform ); 3142 3169 3143 3170 $product_image = preg_replace_callback( … … 3146 3173 return rawurlencode( $match[0] ); 3147 3174 }, 3148 (string) get_the_post_thumbnail_url( $p ost_id, 'thumbnail' )3175 (string) get_the_post_thumbnail_url( $product_id, 'thumbnail' ) 3149 3176 ); 3150 3177 … … 3257 3284 if ( ! empty( $response_array['order'] ) ) { 3258 3285 3259 $ order = $response_array['order'];3286 $wc_order = $response_array['order']; 3260 3287 3261 3288 $result['status'] = 'success'; 3262 3289 3263 $result['order'] = $ order;3290 $result['order'] = $wc_order; 3264 3291 3265 3292 } else { … … 3304 3331 if ( 'success' === $order_result['status'] ) { 3305 3332 3306 $ order = $order_result['order'];3333 $wc_order = $order_result['order']; 3307 3334 3308 3335 if ( ! empty( $order['tenders'] ) ) { … … 3434 3461 * @param array $payment_data Key/value pairs for the payment data. 3435 3462 * @param string $platform The platform that is currently performing this request. 3463 * 3464 * @return array 3436 3465 */ 3437 3466 function fsfwc_do_create_square_payment( $payment_data = array(), $platform = 'any' ) { … … 3501 3530 * @param array $square_location Key/value pairs of Square location data. 3502 3531 * @param string $platform The platform that is currently performing this request. 3532 * 3533 * @return array 3503 3534 */ 3504 3535 function fsfwc_do_generate_square_device_code( $square_location = array(), $platform = 'any' ) { … … 3612 3643 * @param string $square_device_code_id Square device ID. 3613 3644 * @param string $platform The platform that is currently performing this request. 3645 * 3646 * @return array 3614 3647 */ 3615 3648 function fsfwc_do_get_square_device_pair_status( $square_device_code_id = '', $platform = 'any' ) { … … 3651 3684 * @param array $checkout_data Key/value pairs of checkout data. 3652 3685 * @param string $platform The platform that is currently performing this request. 3686 * 3687 * @return array 3653 3688 */ 3654 3689 function fsfwc_do_create_square_terminal_checkout( $checkout_data = array(), $platform = 'any' ) { … … 3738 3773 * @param string $checkout_id The ID of the Square checkout. 3739 3774 * @param string $platform The platform that is currently performing this request. 3775 * 3776 * @return array 3740 3777 */ 3741 3778 function fsfwc_do_get_square_terminal_checkout_status( $checkout_id = '', $platform = 'any' ) { … … 3835 3872 * @param array $refund_data Key/value pairs of refund data. 3836 3873 * @param string $platform The platform that is currently performing this request. 3874 * 3875 * @return array 3837 3876 */ 3838 3877 function fsfwc_do_create_square_terminal_refund( $refund_data = array(), $platform = 'any' ) { … … 3926 3965 * @param string $refund_id The ID of the Square refund. 3927 3966 * @param string $platform The platform that is currently performing this request. 3967 * 3968 * @return array 3928 3969 */ 3929 3970 function fsfwc_do_get_square_terminal_refund_status( $refund_id = '', $platform = 'any' ) { … … 3968 4009 * @param array $reader_data The reader data in associative array. 3969 4010 * @param string $platform The platform that is currently performing this request. 4011 * 4012 * @return array 3970 4013 */ 3971 4014 function fsfwc_do_register_stripe_reader( $reader_data = array(), $platform = 'any' ) { … … 4019 4062 * @since 1.20.0 4020 4063 * @param string $platform The platform that is currently performing this request. 4064 * 4065 * @return array 4021 4066 */ 4022 4067 function fsfwc_do_create_stripe_connection_token( $platform = 'any' ) { … … 4065 4110 * @param string $payment_method The FooSales payment method. 4066 4111 * @param string $platform The platform that is currently performing this request. 4112 * 4113 * @return array 4067 4114 */ 4068 4115 function fsfwc_do_create_stripe_payment_intent( $payment_intent_data = array(), $payment_method = '', $platform = 'any' ) { … … 4123 4170 * @param string $payment_intent_id The payment intent ID. 4124 4171 * @param string $platform The platform that is currently performing this request. 4172 * 4173 * @return array 4125 4174 */ 4126 4175 function fsfwc_do_capture_stripe_payment( $payment_intent_id = '', $platform = 'any' ) { … … 4172 4221 * @param string $stripe_payment_id The ID of the Stripe payment intent. 4173 4222 * @param double $amount The amount in cents to refund to the original payment card. 4223 * 4224 * @return array 4174 4225 */ 4175 4226 function fsfwc_refund_stripe_payment( $stripe_payment_id = '', $amount = 0 ) { … … 4594 4645 4595 4646 /** 4596 * Update the modified date to the current time for the given postID.4647 * Update the modified date to the current time for the given item ID. 4597 4648 * 4598 4649 * @since 1.33.0 4599 * @param int $ post_id The ID of the postto be updated.4600 */ 4601 function fsfwc_update_modified_date( $ post_id = '' ) {4650 * @param int $id The ID of the item to be updated. 4651 */ 4652 function fsfwc_update_modified_date( $id = '' ) { 4602 4653 global $wpdb; 4603 4654 4604 if ( '' !== $post_id) {4655 if ( (int) $id > 0 ) { 4605 4656 $time = time(); 4606 4657 4607 $mysql_time_format = 'Y-m-d H:i:s'; 4608 4609 $post_modified = gmdate( $mysql_time_format, $time ); 4610 4611 $post_modified_gmt = gmdate( $mysql_time_format, ( $time + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ); 4612 4613 $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 4614 $wpdb->prepare( 4615 "UPDATE $wpdb->posts SET post_modified = %s, post_modified_gmt = %s WHERE ID = %s", 4616 $post_modified, 4617 $post_modified_gmt, 4618 $post_id 4619 ) 4620 ); 4621 } 4622 } 4658 if ( OrderUtil::is_order( $id ) ) { 4659 $wc_order = wc_get_order( $id ); 4660 4661 $wc_order->set_date_modified( $time ); 4662 $wc_order->save(); 4663 } else { 4664 $mysql_time_format = 'Y-m-d H:i:s'; 4665 4666 $post_modified = gmdate( $mysql_time_format, $time ); 4667 4668 $post_modified_gmt = gmdate( $mysql_time_format, ( $time + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ); 4669 4670 $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 4671 $wpdb->prepare( 4672 "UPDATE $wpdb->posts SET post_modified = %s, post_modified_gmt = %s WHERE ID = %s", 4673 $post_modified, 4674 $post_modified_gmt, 4675 $id 4676 ) 4677 ); 4678 } 4679 } 4680 } -
foosales/trunk/helpers/foosales-phrases-helper.php
r2919862 r2926151 3 3 * All phrases used throughout the plugin 4 4 * 5 * Generated: 2023-0 5-31 12:35:22GMT-75 * Generated: 2023-06-14 10:20:40 GMT-7 6 6 * 7 7 * @link https://www.foosales.com … … 28 28 'label_expired_free_trial' => __( 'Expired free trial', 'foosales' ), 29 29 'title_expired_free_trial' => __( 'Your free trial has expired!', 'foosales' ), 30 'description_expired_free_trial' => __( 'We hope that you enjoyed your 30-day free trial. Please purchase a FooSales plan to continue using the FooSales apps.', 'foosales' ),30 'description_expired_free_trial' => __( 'We hope that you enjoyed your 7-day free trial. Please purchase a FooSales plan to continue using the FooSales apps.', 'foosales' ), 31 31 'label_active_free_trial' => __( 'Active Free Trial', 'foosales' ), 32 32 'title_active_free_trial' => __( 'Your store domain is currently linked to an active free trial', 'foosales' ), … … 51 51 'label_domain_not_found' => __( 'Not linked', 'foosales' ), 52 52 'title_domain_not_found' => __( 'Your store domain is not currently linked to a FooSales account', 'foosales' ), 53 'description_domain_not_found' => __( 'Your store needs to be linked to a FooSales account in order to use the FooSales apps. Click the button below to sign-up for a FooSales account and start your 30-day free trial today!', 'foosales' ),53 'description_domain_not_found' => __( 'Your store needs to be linked to a FooSales account in order to use the FooSales apps. Click the button below to sign-up for a FooSales account and start your 7-day free trial today!', 'foosales' ), 54 54 'button_link_store' => __( 'Link your store', 'foosales' ), 55 55 'title_download_apps' => __( 'Download the FooSales apps', 'foosales' ), -
foosales/trunk/readme.txt
r2919862 r2926151 4 4 Requires at least: 5.1 5 5 Tested up to: 6.2.2 6 Stable tag: 1.3 3.06 Stable tag: 1.34.0 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 16 16 FooSales POS makes it easy to sell your products and services in-person and run your business from anywhere in the world while automatically syncing your WooCommerce product inventory, order and customer data. Turn your WooCommerce store into an omnichannel retail platform for a fraction of the cost of a traditional POS solution thanks to integrations with popular printers, scanners, card readers and other devices. FooSales is perfect for retail stores, markets, pop-up shops, mobile events and many other use cases. 17 17 18 [youtube https://www.youtube.com/watch?v=I7e_1tpTrRU] 19 20 [Start your 30-day free trial](https://www.foosales.com/signup/?ref=wp) 18 [Start your 7-day free trial](https://www.foosales.com/signup/?ref=wp) 21 19 22 20 = Built for WooCommerce = … … 68 66 Install the FooSales POS plugin directly from your WordPress admin area by clicking 'Add New' in the Plugins menu, then search for "FooSales" OR manually [download the plugin](https://wordpress.org/plugins/foosales/) from WordPress.org. 69 67 70 Step 2: Link your store to a 30-day free trial account68 Step 2: Link your store to a 7-day free trial account 71 69 72 70 [Create a FooSales account](https://www.foosales.com/signup/) which will allow you to access all the FooSales POS features on any computer, iPad or Android tablet. … … 108 106 = I'm in! Where do I start? = 109 107 110 [Sign-up](https://www.foosales.com/signup/) to create a FooSales account and start your 30-day free trial!108 [Sign-up](https://www.foosales.com/signup/) to create a FooSales account and start your 7-day free trial! 111 109 112 110 = How much does FooSales POS cost? = … … 225 223 226 224 == Changelog == 225 226 2023-06-14 - version 1.34.0 227 * Point of sale plugin update: FooSales now supports WooCommerce High Performance Order Storage (HPOS) 227 228 228 229 2023-05-31 - version 1.33.0 -
foosales/trunk/templates/template-foosales-import.php
r2919862 r2926151 92 92 $product_stock = ! empty( $update_product_params['ps'] ) ? $update_product_params['ps'] : 0; 93 93 94 $import_title = esc_html( $foosales_phrases['label_update_product'] ) . ' "' . (string) htmlspecialchars_decode( get_post_field( 'post_title', $update_product_params['pid'] ) ) . '" (' . esc_html( $update_product_params['pid'] ) . ')'; 94 $wc_product = wc_get_product( $product_id ); 95 96 $import_title = esc_html( $foosales_phrases['label_update_product'] ) . ' "' . (string) htmlspecialchars_decode( $wc_product->get_title() ) . '" (' . esc_html( $product_id ) . ')'; 95 97 96 98 if ( $already_imported ) { … … 103 105 $update_product_result = fsfwc_do_update_product( $update_product_params, $platform ); 104 106 105 if ( false !== $update_product_result) {107 if ( ! empty( $update_product_result ) ) { 106 108 $import_result .= ! empty( $update_product_params['pp'] ) ? "\t- " . esc_html( $foosales_phrases['label_update_product_set_price'] ) . ': ' . esc_html( wp_strip_all_tags( wc_price( $product_price ) ) ) . "\n" : ''; 107 109 $import_result .= ! empty( $update_product_params['prp'] ) ? "\t- " . esc_html( $foosales_phrases['label_update_product_set_regular_price'] ) . ': ' . esc_html( wp_strip_all_tags( wc_price( $product_regular_price ) ) ) . "\n" : ''; -
foosales/trunk/vendor/stripe-php/lib/Charge.php
r2919862 r2926151 6 6 7 7 /** 8 * To charge a credit or a debit card, you create a <code>Charge</code> object. You can 9 * retrieve and refund individual charges as well as list all charges. Charges 10 * are identified by a unique, random ID. 11 * 12 * Related guide: <a href="https://stripe.com/docs/payments/accept-a-payment-charges">Accept a payment with the Charges API</a> 8 * The <code>Charge</code> object represents a single attempt to move money into your Stripe account. 9 * PaymentIntent confirmation is the most common way to create Charges, but transferring 10 * money to a different Stripe account through Connect also creates Charges. 11 * Some legacy payment flows create Charges directly, which is not recommended for new integrations. 13 12 * 14 13 * @property string $id Unique identifier for the object. -
foosales/trunk/vendor/stripe-php/lib/Issuing/Cardholder.php
r2919862 r2926151 21 21 * @property string $name The cardholder's name. This will be printed on cards issued to them. 22 22 * @property null|string $phone_number The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the <a href="https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied">3D Secure documentation</a> for more details. 23 * @property null|string[] $preferred_locales The cardholder’s preferred locales (languages), ordered by preference. Locales can be <code>de</code>, <code>en</code>, <code>es</code>, <code>fr</code>, or <code>it</code>. This changes the language of the <a href="https://stripe.com/docs/issuing/3d-secure">3D Secure flow</a> and one-time password messages sent to the cardholder. 23 24 * @property \FooSales\Stripe\StripeObject $requirements 24 25 * @property null|\FooSales\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our <a href="https://stripe.com/docs/issuing/controls/spending-controls">documentation</a> for more details. -
foosales/trunk/vendor/stripe-php/lib/LoginLink.php
r2591658 r2926151 6 6 7 7 /** 8 * Login Links are single-use login link for an Express account to access their Stripe dashboard. 9 * 8 10 * @property string $object String representing the object's type. Objects of the same type share the same value. 9 11 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. -
foosales/trunk/vendor/stripe-php/lib/Service/ChargeService.php
r2708162 r2926151 24 24 25 25 /** 26 * Capture the payment of an existing, uncaptured, charge. This is the second half 27 * of the two-step payment flow, where first you <a href="#create_charge">created a 28 * charge</a> with the capture option set to false. 26 * Capture the payment of an existing, uncaptured charge that was created with the 27 * <code>capture</code> option set to false. 29 28 * 30 29 * Uncaptured payments expire a set number of days after they are created (<a 31 * href="/docs/charges/placing-a-hold">7 by default</a>). If they are not captured 32 * by that point in time, they will be marked as refunded and will no longer be 33 * capturable. 30 * href="/docs/charges/placing-a-hold">7 by default</a>), after which they are 31 * marked as refunded and capture attempts will fail. 32 * 33 * Don’t use this method to capture a PaymentIntent-initiated charge. Use <a 34 * href="/docs/api/payment_intents/capture">Capture a PaymentIntent</a>. 34 35 * 35 36 * @param string $id … … 47 48 48 49 /** 49 * To charge a credit card or other payment source, you create a 50 * <code>Charge</code> object. If your API key is in test mode, the supplied 51 * payment source (e.g., card) won’t actually be charged, although everything else 52 * will occur as if in live mode. (Stripe assumes that the charge would have 53 * completed successfully). 50 * Use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate 51 * a new payment instead of using this method. Confirmation of the PaymentIntent 52 * creates the <code>Charge</code> object used to request payment, so this method 53 * is limited to legacy integrations. 54 54 * 55 55 * @param null|array $params -
foosales/trunk/vendor/stripe-php/lib/Stripe.php
r2919862 r2926151 59 59 private static $initialNetworkRetryDelay = 0.5; 60 60 61 const VERSION = '10.1 4.0';61 const VERSION = '10.15.0'; 62 62 63 63 /** -
foosales/trunk/vendor/stripe-php/lib/Token.php
r2919862 r2926151 27 27 * performs best with integrations that use client-side tokenization. 28 28 * 29 * Related guide: <a href="https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token">Accept a payment with Charges and Tokens</a>30 *31 29 * @property string $id Unique identifier for the object. 32 30 * @property string $object String representing the object's type. Objects of the same type share the same value.
Note: See TracChangeset
for help on using the changeset viewer.