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,206 @@
<?php
/**
* Adjustments Table.
*
* @package EDD
* @subpackage Database\Tables
* @copyright Copyright (c) 2018, Easy Digital Downloads, LLC
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 3.0
*/
namespace EDD\Database\Tables;
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
use EDD\Database\Table;
/**
* Setup the global "edd_adjustments" database table.
*
* @since 3.0
*/
final class Adjustments extends Table {
/**
* Table name.
*
* @access protected
* @since 3.0
* @var string
*/
protected $name = 'adjustments';
/**
* Database version.
*
* @access protected
* @since 3.0
* @var int
*/
protected $version = 202102161;
/**
* Array of upgrade versions and methods.
*
* @access protected
* @since 3.0
* @var array
*/
protected $upgrades = array(
'201906031' => 201906031,
'202002121' => 202002121,
'202102161' => 202102161
);
/**
* Setup the database schema.
*
* @access protected
* @since 3.0
*/
protected function set_schema() {
$this->schema = "id bigint(20) unsigned NOT NULL auto_increment,
parent bigint(20) unsigned NOT NULL default '0',
name varchar(200) NOT NULL default '',
code varchar(50) NOT NULL default '',
status varchar(20) NOT NULL default '',
type varchar(20) NOT NULL default '',
scope varchar(20) NOT NULL default 'all',
amount_type varchar(20) NOT NULL default '',
amount decimal(18,9) NOT NULL default '0',
description longtext NOT NULL default '',
max_uses bigint(20) unsigned NOT NULL default '0',
use_count bigint(20) unsigned NOT NULL default '0',
once_per_customer int(1) NOT NULL default '0',
min_charge_amount decimal(18,9) NOT NULL default '0',
start_date datetime default null,
end_date datetime default null,
date_created datetime NOT NULL default CURRENT_TIMESTAMP,
date_modified datetime NOT NULL default CURRENT_TIMESTAMP,
uuid varchar(100) NOT NULL default '',
PRIMARY KEY (id),
KEY type_status (type(20), status(20)),
KEY code (code),
KEY date_created (date_created),
KEY date_start_end (start_date,end_date)";
}
/**
* Create the table
*
* @since 3.0
*
* @return bool
*/
public function create() {
$created = parent::create();
// After successful creation, we need to set the auto_increment for legacy orders.
if ( ! empty( $created ) ) {
$result = $this->get_db()->get_var( "SELECT ID FROM {$this->get_db()->prefix}posts WHERE post_type = 'edd_discount' ORDER BY ID DESC LIMIT 1;" );
if ( ! empty( $result ) ) {
$auto_increment = $result + 1;
$this->get_db()->query( "ALTER TABLE {$this->table_name} AUTO_INCREMENT = {$auto_increment};" );
}
}
return $created;
}
/**
* Upgrade to version 201906031
* - Drop the `product_condition` column.
*
* @since 3.0
*
* @return boolean True if upgrade was successful, false otherwise.
*/
protected function __201906031() {
// Look for column
$result = $this->column_exists( 'product_condition' );
// Maybe remove column
if ( true === $result ) {
// Try to remove it
$result = ! $this->get_db()->query( "
ALTER TABLE {$this->table_name} DROP COLUMN `product_condition`
" );
// Return success/fail
return $this->is_success( $result );
// Return true because column is already gone
} else {
return $this->is_success( true );
}
}
/**
* Upgrade to version 202002121
* - Change default value to `null` for columns `start_date` and `end_date`.
* - Change default value to `CURRENT_TIMESTAMP` for columns `date_created` and `date_modified`.
*
* @return bool
*/
protected function __202002121() {
// Update `start_date`.
$result = $this->get_db()->query( "
ALTER TABLE {$this->table_name} MODIFY COLUMN `start_date` datetime default null;
" );
if ( $this->is_success( $result ) ) {
$this->get_db()->query( "UPDATE {$this->table_name} SET `start_date` = NULL WHERE `start_date` = '0000-00-00 00:00:00'" );
}
// Update `end_date`.
$result = $this->get_db()->query( "
ALTER TABLE {$this->table_name} MODIFY COLUMN `end_date` datetime default null;
" );
if ( $this->is_success( $result ) ) {
$this->get_db()->query( "UPDATE {$this->table_name} SET `end_date` = NULL WHERE `end_date` = '0000-00-00 00:00:00'" );
}
// Update `date_created`.
$result = $this->get_db()->query( "
ALTER TABLE {$this->table_name} MODIFY COLUMN `date_created` datetime NOT NULL default CURRENT_TIMESTAMP;
" );
// Update `date_modified`.
$result = $this->get_db()->query( "
ALTER TABLE {$this->table_name} MODIFY COLUMN `date_modified` datetime NOT NULL default CURRENT_TIMESTAMP;
" );
return $this->is_success( $result );
}
/**
* Upgrade to version 202102161
* - Drop old `code_status_type_scope_amount` index
* - Create new `status_type` index
* - Create new `code` index
*
* @since 3.0
* @return bool
*/
protected function __202102161() {
if ( $this->index_exists( 'code_status_type_scope_amount' ) ) {
$this->get_db()->query( "ALTER TABLE {$this->table_name} DROP INDEX code_status_type_scope_amount" );
}
$this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX type_status (type(20), status(20))" );
$this->get_db()->query( "ALTER TABLE {$this->table_name} ADD INDEX code (code)" );
return true;
}
}