installed plugin Easy Digital Downloads version 3.1.0.3

This commit is contained in:
2022-11-27 15:03:07 +00:00
committed by Gitium
parent 555673545b
commit c5dce2cec6
1200 changed files with 238970 additions and 0 deletions
wp-content/plugins/easy-digital-downloads
assets
css
images
js
admin
alpine.min.jsedd-admin-customers.jsedd-admin-dashboard.jsedd-admin-discounts.jsedd-admin-downloads.jsedd-admin-email-tags.jsedd-admin-extension-manager.jsedd-admin-notes.jsedd-admin-notices.jsedd-admin-orders.jsedd-admin-orders.js.mapedd-admin-payments.jsedd-admin-reports.jsedd-admin-settings.jsedd-admin-tax-rates.jsedd-admin-tax-rates.js.mapedd-admin-tools-export.jsedd-admin-tools-import.jsedd-admin-tools.jsedd-admin-upgrades.jsedd-admin.jsedd-ajax.jsedd-checkout-global.js
frontend
checkout
components
agree-to-terms
index.jsutils.js
edd-ajax.js
gateways
jquery.validate.min.js
packages
paypal-checkout.js
utils
vendor
wp-polyfill.min.js
sample-products-import.xml
easy-digital-downloads.php
includes
EDD_SL_Plugin_Updater.phpactions.php
adjustments
admin
add-ons.php
adjustments
admin-actions.phpadmin-bar.phpadmin-deprecated-functions.phpadmin-footer.phpadmin-pages.phpclass-api-keys-table.phpclass-edd-heartbeat.phpclass-edd-notices.phpclass-list-table.phpclass-pass-manager.phpclass-sections.php
customers
dashboard-widgets.php
discounts
downloads
emails
extensions
import
installers
notes
payments
plugins.php
promos
reporting
settings
thickbox.phptools.php
tools
tracking.php
upgrades
upload-functions.php
views
ajax-functions.php
api
blocks
assets
build
edd-blocks.php
includes
readme.md
views
cart
checkout
class-base-object.phpclass-component.phpclass-easy-digital-downloads.phpclass-edd-cache-helper.phpclass-edd-cli.phpclass-edd-cron.phpclass-edd-customer-query.phpclass-edd-customer.phpclass-edd-db-customer-meta.phpclass-edd-db-customers.phpclass-edd-db.phpclass-edd-discount.phpclass-edd-download.phpclass-edd-fees.phpclass-edd-html-elements.phpclass-edd-license-handler.phpclass-edd-logging.phpclass-edd-register-meta.phpclass-edd-roles.phpclass-edd-session.phpclass-edd-stats.phpclass-stats.phpclass-structured-data.phpclass-utilities.phpcompat-functions.php
compat
component-functions.phpcountry-functions.php
currency
customer-functions.php
customers
database
NotificationsDB.phpREADME.md
engine
queries
rows
schemas
tables
date-functions.phpdeprecated-functions.phpdeprecated-hooks.phpdiscount-functions.phpdownload-functions.php
downloads
emails
error-tracking.php
extensions
formatting.php
gateways
actions.phpamazon-payments.phpfunctions.php
libs
manual.phppaypal-standard.php
paypal
stripe
apple-developer-merchantid-domain-association
assets
edd-stripe.php
includes
vendor
autoload.php
composer
stripe
stripe-php
CHANGELOG.mdCODE_OF_CONDUCT.mdLICENSEMakefileREADME.mdVERSIONbuild.phpcomposer.json
data
init.php
lib
Account.phpAccountLink.phpAlipayAccount.php
ApiOperations
ApiRequestor.phpApiResource.phpApiResponse.phpApplePayDomain.phpApplicationFee.phpApplicationFeeRefund.phpBalance.phpBalanceTransaction.phpBankAccount.phpBaseStripeClient.php
BillingPortal
BitcoinReceiver.phpBitcoinTransaction.phpCapability.phpCard.phpCharge.php
Checkout
Collection.phpCountrySpec.phpCoupon.phpCreditNote.phpCreditNoteLineItem.phpCustomer.phpCustomerBalanceTransaction.phpDiscount.phpDispute.phpEphemeralKey.phpErrorObject.phpEvent.php
Exception
ExchangeRate.phpFile.phpFileLink.php
HttpClient
Invoice.phpInvoiceItem.phpInvoiceLineItem.php
Issuing
LineItem.phpLoginLink.phpMandate.phpOAuth.phpOAuthErrorObject.phpOrder.phpOrderItem.phpOrderReturn.phpPaymentIntent.phpPaymentMethod.phpPayout.phpPerson.phpPlan.phpPrice.phpProduct.phpPromotionCode.php
Radar
Recipient.phpRecipientTransfer.phpRefund.php
Reporting
RequestTelemetry.phpReview.phpSKU.php
Service
AbstractService.phpAbstractServiceFactory.phpAccountLinkService.phpAccountService.phpApplePayDomainService.phpApplicationFeeService.phpBalanceService.phpBalanceTransactionService.php
BillingPortal
ChargeService.php
Checkout
CoreServiceFactory.phpCountrySpecService.phpCouponService.phpCreditNoteService.phpCustomerService.phpDisputeService.phpEphemeralKeyService.phpEventService.phpExchangeRateService.phpFileLinkService.phpFileService.phpInvoiceItemService.phpInvoiceService.php
Issuing
MandateService.phpOAuthService.phpOrderReturnService.phpOrderService.phpPaymentIntentService.phpPaymentMethodService.phpPayoutService.phpPlanService.phpPriceService.phpProductService.phpPromotionCodeService.php
Radar
RefundService.php
Reporting
ReviewService.phpSetupIntentService.php
Sigma
SkuService.phpSourceService.phpSubscriptionItemService.phpSubscriptionScheduleService.phpSubscriptionService.phpTaxRateService.php
Terminal
TokenService.phpTopupService.phpTransferService.phpWebhookEndpointService.php
SetupIntent.php
Sigma
SingletonApiResource.phpSource.phpSourceTransaction.phpStripe.phpStripeClient.phpStripeClientInterface.phpStripeObject.phpSubscription.phpSubscriptionItem.phpSubscriptionSchedule.phpTaxId.phpTaxRate.php
Terminal
ThreeDSecure.phpToken.phpTopup.phpTransfer.phpTransferReversal.phpUsageRecord.phpUsageRecordSummary.php
Util
Webhook.phpWebhookEndpoint.phpWebhookSignature.php
phpdoc.dist.xmlphpstan-baseline.neonphpstan.neon.distupdate_certs.php
install.phpinterface-edd-exception.php
libraries
logs
mime-types.phpmisc-functions.php
models
notes
orders
payments
plugin-compatibility.phppost-types.phpprivacy-functions.phpprocess-download.phpprocess-purchase.phpquery-filters.phprefund-functions.php
reports
scripts.phpshortcodes.phptax-functions.phptemplate-actions.phptemplate-functions.phptheme-compatibility.php
traits
user-functions.php
users
utils
widgets.php
languages
license.txtreadme.txt
templates
uninstall.php

@ -0,0 +1,203 @@
<?php
/**
* Order Address Functions.
*
* @package EDD
* @subpackage Orders
* @copyright Copyright (c) 2018, Easy Digital Downloads, LLC
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 3.0
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/**
* Add an order address.
*
* @since 3.0
*
* @param array $data {
* Array of order address data. Default empty.
*
* The `date_created` and `date_modified` parameters do not need to be passed.
* They will be automatically populated if empty.
*
* @type int $order_id Order ID. Default `0`.
* @type string $name Customer's full name. Default empty.
* @type string $address First line of address. Default empty.
* @type string $address2 Second line of address. Default empty.
* @type string $city City. Default empty.
* @type string $region Region. See `edd_get_shop_states()` for
* accepted values. Default empty.
* @type string $postal_code Postal code. Default empty.
* @type string $country Country. See `edd_get_country_list()` for
* accepted values. Default empty.
* @type string $date_created Optional. Automatically calculated on add/edit.
* The date & time the address was inserted.
* Format: YYYY-MM-DD HH:MM:SS. Default empty.
* @type string $date_modified Optional. Automatically calculated on add/edit.
* The date & time the address was last modified.
* Format: YYYY-MM-DD HH:MM:SS. Default empty.
* }
* @return int|false ID of newly created order address, false on error.
*/
function edd_add_order_address( $data ) {
// An order ID must be supplied for every address inserted.
if ( empty( $data['order_id'] ) ) {
return false;
}
// Set up an array with empty address keys. If all of these are empty in $data, the address should not be added.
$empty_address = array(
'address' => '',
'address2' => '',
'city' => '',
'region' => '',
'country' => '',
'postal_code' => '',
);
$address_to_check = array_intersect_key( $data, $empty_address );
$address_to_check = array_filter( $address_to_check );
if ( empty( $address_to_check ) ) {
return false;
}
// Instantiate a query object
$order_addresses = new EDD\Database\Queries\Order_Address();
return $order_addresses->add_item( $data );
}
/**
* Delete an order address.
*
* @since 3.0
*
* @param int $order_address_id Order address ID.
* @return int|false `1` if the address was deleted successfully, false on error.
*/
function edd_delete_order_address( $order_address_id = 0 ) {
$order_addresses = new EDD\Database\Queries\Order_Address();
return $order_addresses->delete_item( $order_address_id );
}
/**
* Update an order address.
*
* @since 3.0
*
* @param int $order_address_id Order address ID.
* @param array $data {
* Array of order address data. Default empty.
*
* @type int $order_id Order ID. Default `0`.
* @type string $name Customer's full name. Default empty.
* @type string $address First line of address. Default empty.
* @type string $address2 Second line of address. Default empty.
* @type string $city City. Default empty.
* @type string $region Region. See `edd_get_shop_states()` for
* accepted values. Default empty.
* @type string $postal_code Postal code. Default empty.
* @type string $country Country. See `edd_get_country_list()` for
* accepted values. Default empty.
* @type string $date_created Optional. Automatically calculated on add/edit.
* The date & time the address was inserted.
* Format: YYYY-MM-DD HH:MM:SS. Default empty.
* @type string $date_modified Optional. Automatically calculated on add/edit.
* The date & time the address was last modified.
* Format: YYYY-MM-DD HH:MM:SS. Default empty.
* }
*
* @return bool Whether or not the API request order was updated.
*/
function edd_update_order_address( $order_address_id = 0, $data = array() ) {
$order_addresses = new EDD\Database\Queries\Order_Address();
return $order_addresses->update_item( $order_address_id, $data );
}
/**
* Get an order address by ID.
*
* @since 3.0
*
* @param int $order_address_id Order address ID.
* @return \EDD\Orders\Order_Address|false Order_Address if successful, false
* otherwise.
*/
function edd_get_order_address( $order_address_id = 0 ) {
$order_addresses = new EDD\Database\Queries\Order_Address();
// Return order address
return $order_addresses->get_item( $order_address_id );
}
/**
* Get an order address by a specific field value.
*
* @since 3.0
*
* @param string $field Database table field.
* @param string $value Value of the row.
*
* @return \EDD\Orders\Order_Address|false Order_Address if successful, false otherwise.
*/
function edd_get_order_address_by( $field = '', $value = '' ) {
$order_addresses = new EDD\Database\Queries\Order_Address();
// Return order address
return $order_addresses->get_item_by( $field, $value );
}
/**
* Query for order addresses.
*
* @see \EDD\Database\Queries\Order_Address::__construct()
*
* @since 3.0
*
* @param array $args Arguments. See `EDD\Database\Queries\Order_Address` for
* accepted arguments.
* @return \EDD\Orders\Order_Address[] Array of `Order_Address` objects.
*/
function edd_get_order_addresses( $args = array() ) {
// Parse args
$r = wp_parse_args( $args, array(
'number' => 30,
) );
// Instantiate a query object
$order_addresses = new EDD\Database\Queries\Order_Address();
// Return orders
return $order_addresses->query( $r );
}
/**
* Count order addresses.
*
* @see \EDD\Database\Queries\Order_Address::__construct()
*
* @since 3.0
*
* @param array $args Arguments. See `EDD\Database\Queries\Order_Address` for
* accepted arguments.
* @return int Number of order addresses returned based on query arguments passed.
*/
function edd_count_order_addresses( $args = array() ) {
// Parse args
$r = wp_parse_args( $args, array(
'count' => true,
) );
// Query for count(s)
$order_addresses = new EDD\Database\Queries\Order_Address( $r );
// Return count(s)
return absint( $order_addresses->found_items );
}