initial commit

This commit is contained in:
2021-12-10 12:03:04 +00:00
commit c46c7ddbf0
3643 changed files with 582794 additions and 0 deletions
assets
css
_animation.scss_fonts.scss_mixins.scss_variables.scssactivation-rtl.cssactivation.cssactivation.scssadmin-rtl.cssadmin.cssadmin.scssauth-rtl.cssauth.cssauth.scssdashboard-rtl.cssdashboard-setup-rtl.cssdashboard-setup.cssdashboard-setup.scssdashboard.cssdashboard.scsshelper-rtl.csshelper.csshelper.scss
jquery-ui
marketplace-suggestions-rtl.cssmarketplace-suggestions.cssmarketplace-suggestions.scssmenu-rtl.cssmenu.cssmenu.scssnetwork-order-widget-rtl.cssnetwork-order-widget.cssnetwork-order-widget.scss
photoswipe
prettyPhoto-rtl.cssprettyPhoto.cssprettyPhoto.scssprivacy-rtl.cssprivacy.cssprivacy.scssreports-print-rtl.cssreports-print.cssreports-print.scssselect2.cssselect2.scsstwenty-nineteen-rtl.csstwenty-nineteen.csstwenty-nineteen.scsstwenty-seventeen-rtl.csstwenty-seventeen.csstwenty-seventeen.scsstwenty-twenty-one-admin-rtl.csstwenty-twenty-one-admin.csstwenty-twenty-one-admin.scsstwenty-twenty-one-rtl.csstwenty-twenty-one.csstwenty-twenty-one.scsstwenty-twenty-rtl.csstwenty-twenty.csstwenty-twenty.scsswc-setup-rtl.csswc-setup.csswc-setup.scsswoocommerce-layout-rtl.csswoocommerce-layout.csswoocommerce-layout.scsswoocommerce-rtl.csswoocommerce-smallscreen-rtl.csswoocommerce-smallscreen.csswoocommerce-smallscreen.scsswoocommerce.csswoocommerce.scss
fonts
images
js
accounting
admin
flexslider
frontend
jquery-blockui
jquery-cookie
jquery-flot
jquery-payment
jquery-qrcode
jquery-serializejson
jquery-tiptip
jquery-ui-touch-punch
js-cookie
photoswipe
prettyPhoto
round
select2
selectWoo
stupidtable
zeroclipboard
zoom
i18n
includes
abstracts
admin
class-wc-admin-addons.phpclass-wc-admin-api-keys-table-list.phpclass-wc-admin-api-keys.phpclass-wc-admin-assets.phpclass-wc-admin-attributes.phpclass-wc-admin-customize.phpclass-wc-admin-dashboard-setup.phpclass-wc-admin-dashboard.phpclass-wc-admin-duplicate-product.phpclass-wc-admin-exporters.phpclass-wc-admin-help.phpclass-wc-admin-importers.phpclass-wc-admin-log-table-list.phpclass-wc-admin-menus.phpclass-wc-admin-meta-boxes.phpclass-wc-admin-notices.phpclass-wc-admin-permalink-settings.phpclass-wc-admin-pointers.phpclass-wc-admin-post-types.phpclass-wc-admin-profile.phpclass-wc-admin-reports.phpclass-wc-admin-settings.phpclass-wc-admin-setup-wizard.phpclass-wc-admin-status.phpclass-wc-admin-taxonomies.phpclass-wc-admin-webhooks-table-list.phpclass-wc-admin-webhooks.phpclass-wc-admin.php
helper
importers
list-tables
marketplace-suggestions
meta-boxes
notes
plugin-updates
reports
settings
views
wc-admin-functions.phpwc-meta-box-functions.php
blocks
class-wc-ajax.phpclass-wc-api.phpclass-wc-auth.phpclass-wc-autoloader.phpclass-wc-background-emailer.phpclass-wc-background-updater.phpclass-wc-breadcrumb.phpclass-wc-cache-helper.phpclass-wc-cart-fees.phpclass-wc-cart-session.phpclass-wc-cart-totals.phpclass-wc-cart.phpclass-wc-checkout.phpclass-wc-cli.phpclass-wc-comments.phpclass-wc-countries.phpclass-wc-coupon.phpclass-wc-customer-download-log.phpclass-wc-customer-download.phpclass-wc-customer.phpclass-wc-data-exception.phpclass-wc-data-store.phpclass-wc-datetime.phpclass-wc-deprecated-action-hooks.phpclass-wc-deprecated-filter-hooks.phpclass-wc-discounts.phpclass-wc-download-handler.phpclass-wc-emails.phpclass-wc-embed.phpclass-wc-form-handler.phpclass-wc-frontend-scripts.phpclass-wc-geo-ip.phpclass-wc-geolite-integration.phpclass-wc-geolocation.phpclass-wc-https.phpclass-wc-install.phpclass-wc-integrations.phpclass-wc-log-levels.phpclass-wc-logger.phpclass-wc-meta-data.phpclass-wc-order-factory.phpclass-wc-order-item-coupon.phpclass-wc-order-item-fee.phpclass-wc-order-item-meta.phpclass-wc-order-item-product.phpclass-wc-order-item-shipping.phpclass-wc-order-item-tax.phpclass-wc-order-item.phpclass-wc-order-query.phpclass-wc-order-refund.phpclass-wc-order.phpclass-wc-payment-gateways.phpclass-wc-payment-tokens.phpclass-wc-post-data.phpclass-wc-post-types.phpclass-wc-privacy-background-process.phpclass-wc-privacy-erasers.phpclass-wc-privacy-exporters.phpclass-wc-privacy.phpclass-wc-product-attribute.phpclass-wc-product-download.phpclass-wc-product-external.phpclass-wc-product-factory.phpclass-wc-product-grouped.phpclass-wc-product-query.phpclass-wc-product-simple.phpclass-wc-product-variable.phpclass-wc-product-variation.phpclass-wc-query.phpclass-wc-rate-limiter.phpclass-wc-regenerate-images-request.phpclass-wc-regenerate-images.phpclass-wc-register-wp-admin-settings.phpclass-wc-rest-authentication.phpclass-wc-rest-exception.phpclass-wc-session-handler.phpclass-wc-shipping-rate.phpclass-wc-shipping-zone.phpclass-wc-shipping-zones.phpclass-wc-shipping.phpclass-wc-shortcodes.phpclass-wc-structured-data.phpclass-wc-tax.phpclass-wc-template-loader.phpclass-wc-tracker.phpclass-wc-validation.phpclass-wc-webhook.phpclass-woocommerce.php
cli
customizer
data-stores
emails
export
gateways
import
integrations
interfaces
legacy
libraries
log-handlers
payment-tokens
queue
rest-api
Controllers
Telemetry
Version1
Version2
Version3
class-wc-rest-controller.phpclass-wc-rest-coupons-controller.phpclass-wc-rest-crud-controller.phpclass-wc-rest-customer-downloads-controller.phpclass-wc-rest-customers-controller.phpclass-wc-rest-data-continents-controller.phpclass-wc-rest-data-controller.phpclass-wc-rest-data-countries-controller.phpclass-wc-rest-data-currencies-controller.phpclass-wc-rest-network-orders-controller.phpclass-wc-rest-order-notes-controller.phpclass-wc-rest-order-refunds-controller.phpclass-wc-rest-orders-controller.phpclass-wc-rest-payment-gateways-controller.phpclass-wc-rest-posts-controller.phpclass-wc-rest-product-attribute-terms-controller.phpclass-wc-rest-product-attributes-controller.phpclass-wc-rest-product-categories-controller.phpclass-wc-rest-product-reviews-controller.phpclass-wc-rest-product-shipping-classes-controller.phpclass-wc-rest-product-tags-controller.phpclass-wc-rest-product-variations-controller.phpclass-wc-rest-products-controller.phpclass-wc-rest-report-coupons-totals-controller.phpclass-wc-rest-report-customers-totals-controller.phpclass-wc-rest-report-orders-totals-controller.phpclass-wc-rest-report-products-totals-controller.phpclass-wc-rest-report-reviews-totals-controller.phpclass-wc-rest-report-sales-controller.phpclass-wc-rest-report-top-sellers-controller.phpclass-wc-rest-reports-controller.phpclass-wc-rest-setting-options-controller.phpclass-wc-rest-settings-controller.phpclass-wc-rest-shipping-methods-controller.phpclass-wc-rest-shipping-zone-locations-controller.phpclass-wc-rest-shipping-zone-methods-controller.phpclass-wc-rest-shipping-zones-controller-base.phpclass-wc-rest-shipping-zones-controller.phpclass-wc-rest-system-status-controller.phpclass-wc-rest-system-status-tools-controller.phpclass-wc-rest-tax-classes-controller.phpclass-wc-rest-taxes-controller.phpclass-wc-rest-terms-controller.phpclass-wc-rest-webhooks-controller.php
Package.phpServer.php
Utilities
shipping
shortcodes
theme-support
tracks
traits
walkers
wc-account-functions.phpwc-attribute-functions.phpwc-cart-functions.phpwc-conditional-functions.phpwc-core-functions.phpwc-coupon-functions.phpwc-deprecated-functions.phpwc-formatting-functions.phpwc-notice-functions.phpwc-order-functions.phpwc-order-item-functions.phpwc-page-functions.phpwc-product-functions.phpwc-rest-functions.phpwc-stock-functions.phpwc-template-functions.phpwc-template-hooks.phpwc-term-functions.phpwc-update-functions.phpwc-user-functions.phpwc-webhook-functions.phpwc-widget-functions.php
wccom-site
widgets
lib/packages/League/Container
license.txt
packages
action-scheduler
action-scheduler.php
classes
ActionScheduler_ActionClaim.phpActionScheduler_ActionFactory.phpActionScheduler_AdminView.phpActionScheduler_AsyncRequest_QueueRunner.phpActionScheduler_Compatibility.phpActionScheduler_DataController.phpActionScheduler_DateTime.phpActionScheduler_Exception.phpActionScheduler_FatalErrorMonitor.phpActionScheduler_InvalidActionException.phpActionScheduler_ListTable.phpActionScheduler_LogEntry.phpActionScheduler_NullLogEntry.phpActionScheduler_OptionLock.phpActionScheduler_QueueCleaner.phpActionScheduler_QueueRunner.phpActionScheduler_Versions.phpActionScheduler_WPCommentCleaner.phpActionScheduler_wcSystemStatus.php
WP_CLI
abstracts
actions
data-stores
migration
schedules
schema
deprecated
functions.php
lib
license.txtreadme.txt
woocommerce-admin
chunk-src-version-param.js
dist
activity-panels-help
activity-panels-inbox
analytics-report-categories
analytics-report-customers
analytics-report-orders
analytics-report-products
analytics-report-stock
analytics-report
analytics-settings
app
beta-features-tracking-modal
chunks
components
csv-export
currency
customer-effort-score
dashboard-charts
dashboard
data
date
experimental
explat
homescreen
leaderboards
marketing-coupons
marketing-overview
navigation-opt-out
navigation
notices
number
onboarding
payment-method-promotions
payment-recommendations
print-shipping-label-banner
profile-wizard
shipping-recommendations
store-alerts
store-performance
task-list
tracks
undefined
wp-admin-scripts
images
includes
languages
license.txtlint-staged.config.jsreadme.txt
src
API
Coupons.phpCustomAttributeTraits.phpCustomers.phpData.phpDataCountries.phpDataDownloadIPs.phpFeatures.phpInit.phpLeaderboards.phpMarketing.phpMarketingOverview.phpNavigationFavorites.phpNoteActions.phpNotes.phpOnboardingFreeExtensions.phpOnboardingPayments.phpOnboardingProductTypes.phpOnboardingProfile.phpOnboardingTasks.phpOnboardingThemes.phpOptions.phpOrders.phpPlugins.phpProductAttributeTerms.phpProductAttributes.phpProductCategories.phpProductReviews.phpProductVariations.phpProducts.phpProductsLowInStock.php
Reports
SettingOptions.phpTaxes.php
Templates
Themes.php
CategoryLookup.php
Composer
DateTimeProvider
DeprecatedClassFacade.phpEvents.phpFeaturePlugin.php
Features
Install.phpLoader.php
Marketing
Notes
Overrides
PageController.phpPaymentPlugins.phpPluginsHelper.phpPluginsInstaller.php
PluginsProvider
RemoteInboxNotifications
ReportCSVEmail.phpReportCSVExporter.phpReportExporter.phpReportsSync.php
Schedulers
Survey.phpWCAdminHelper.phpWCAdminSharedSettings.php
typings
uninstall.phpunminify.js
vendor
autoload.phpautoload_packages.php
automattic
composer
ClassLoader.phpInstalledVersions.phpLICENSEautoload_classmap.phpautoload_namespaces.phpautoload_psr4.phpautoload_real.phpautoload_static.phpinstalled.jsoninstalled.php
installers
LICENSEphpstan.neon.dist
src
Composer
Installers
AglInstaller.phpAimeosInstaller.phpAnnotateCmsInstaller.phpAsgardInstaller.phpAttogramInstaller.phpBaseInstaller.phpBitrixInstaller.phpBonefishInstaller.phpCakePHPInstaller.phpChefInstaller.phpCiviCrmInstaller.phpClanCatsFrameworkInstaller.phpCockpitInstaller.phpCodeIgniterInstaller.phpConcrete5Installer.phpCraftInstaller.phpCroogoInstaller.phpDecibelInstaller.phpDframeInstaller.phpDokuWikiInstaller.phpDolibarrInstaller.phpDrupalInstaller.phpElggInstaller.phpEliasisInstaller.phpExpressionEngineInstaller.phpEzPlatformInstaller.phpFuelInstaller.phpFuelphpInstaller.phpGravInstaller.phpHuradInstaller.phpImageCMSInstaller.phpInstaller.phpItopInstaller.phpJoomlaInstaller.phpKanboardInstaller.phpKirbyInstaller.phpKnownInstaller.phpKodiCMSInstaller.phpKohanaInstaller.phpLanManagementSystemInstaller.phpLaravelInstaller.phpLavaLiteInstaller.phpLithiumInstaller.phpMODULEWorkInstaller.phpMODXEvoInstaller.phpMagentoInstaller.phpMajimaInstaller.phpMakoInstaller.phpMantisBTInstaller.phpMauticInstaller.phpMayaInstaller.phpMediaWikiInstaller.phpMiaoxingInstaller.phpMicroweberInstaller.phpModxInstaller.phpMoodleInstaller.phpOctoberInstaller.phpOntoWikiInstaller.phpOsclassInstaller.phpOxidInstaller.phpPPIInstaller.phpPantheonInstaller.phpPhiftyInstaller.phpPhpBBInstaller.phpPimcoreInstaller.phpPiwikInstaller.phpPlentymarketsInstaller.phpPlugin.phpPortoInstaller.phpPrestashopInstaller.phpProcessWireInstaller.phpPuppetInstaller.phpPxcmsInstaller.phpRadPHPInstaller.phpReIndexInstaller.phpRedaxo5Installer.phpRedaxoInstaller.phpRoundcubeInstaller.phpSMFInstaller.phpShopwareInstaller.phpSilverStripeInstaller.phpSiteDirectInstaller.phpStarbugInstaller.phpSyDESInstaller.phpSyliusInstaller.phpSymfony1Installer.phpTYPO3CmsInstaller.phpTYPO3FlowInstaller.phpTaoInstaller.phpTastyIgniterInstaller.phpTheliaInstaller.phpTuskInstaller.phpUserFrostingInstaller.phpVanillaInstaller.phpVgmcpInstaller.phpWHMCSInstaller.phpWinterInstaller.phpWolfCMSInstaller.phpWordPressInstaller.phpYawikInstaller.phpZendInstaller.phpZikulaInstaller.php
bootstrap.php
jetpack_autoload_classmap.phpjetpack_autoload_psr4.phpplatform_check.php
jetpack-autoloader
woocommerce-admin.php
woocommerce-blocks
LICENSE
assets
css
js
atomic
base
components
block-error-boundary
button
cart-checkout
checkbox-control
checkbox-list
chip
combobox
country-input
drawer
dropdown-selector
filter-element-label
filter-submit-button
form
formatted-monetary-amount
label
load-more-button
loading-mask
pagination
price-slider
product-list
product-name
product-price
quantity-selector
radio-control-accordion
radio-control
read-more
reviews
index.js
review-list-item
review-list
review-sort-select
sidebar-layout
sort-select
spinner
state-input
summary
tabs
text-input
textarea
title
context
event-emit
hooks
index.ts
providers
test
utils.js
hocs
hooks
utils
blocks-registry
blocks
active-filters
attribute-filter
cart-checkout
cart-i2
cart
checkout
attributes.tsblock.tsx
checkout-order-error
columns
context.tsedit.tsxeditor-utils.ts
empty-cart
form-step
frontend.tsxhacks.tsindex.tsx
inner-blocks
order-notes
phone-number
styles
types.tsuse-forced-layout.tsutils.ts
mini-cart
payment-methods
featured-category
featured-product
handpicked-products
price-filter
product-best-sellers
product-categories
product-category
product-new
product-on-sale
product-search
product-tag
product-top-rated
products-by-attribute
products
reviews
single-product
stock-filter
data
editor-components
block-title
compatibility-notices
edit-product-link
error-placeholder
expandable-search-list-item
external-link-card
feedback-prompt
grid-content-control
grid-layout-control
heading-toolbar
page-selector
product-attribute-term-control
product-category-control
product-control
product-orderby-control
product-tag-control
products-control
text-toolbar-button
toggle-button-control
utils
view-switcher
extensions
filters
global.d.ts
hocs
icons
index.js
middleware
payment-method-extensions
previews
settings
shared
types
utils
build
active-filters-frontend.asset.phpactive-filters-frontend.jsactive-filters.asset.phpactive-filters.jsall-products-frontend.asset.phpall-products-frontend.jsall-products.asset.phpall-products.jsall-reviews.asset.phpall-reviews.js
atomic-block-components
attribute-filter-frontend.asset.phpattribute-filter-frontend.jsattribute-filter.asset.phpattribute-filter.jsblocks-checkout.asset.phpblocks-checkout.js
cart-blocks
cart-frontend.asset.phpcart-frontend.jscart-i2-frontend.asset.phpcart-i2-frontend.jscart-i2.asset.phpcart-i2.jscart.asset.phpcart.js
checkout-blocks
checkout-frontend.asset.phpcheckout-frontend.jscheckout.asset.phpcheckout.jsfeatured-category.asset.phpfeatured-category.jsfeatured-product.asset.phpfeatured-product.jshandpicked-products.asset.phphandpicked-products.jsmini-cart-component-frontend.asset.phpmini-cart-component-frontend.jsmini-cart-frontend.asset.phpmini-cart-frontend.jsmini-cart.asset.phpmini-cart.jsprice-filter-frontend.asset.phpprice-filter-frontend.jsprice-filter.asset.phpprice-filter.jsprice-format.asset.phpprice-format.jsproduct-best-sellers.asset.phpproduct-best-sellers.jsproduct-categories.asset.phpproduct-categories.jsproduct-category.asset.phpproduct-category.jsproduct-new.asset.phpproduct-new.jsproduct-on-sale.asset.phpproduct-on-sale.jsproduct-search.asset.phpproduct-search.jsproduct-tag.asset.phpproduct-tag.jsproduct-top-rated.asset.phpproduct-top-rated.jsproducts-by-attribute.asset.phpproducts-by-attribute.jsreviews-by-category.asset.phpreviews-by-category.jsreviews-by-product.asset.phpreviews-by-product.jsreviews-frontend.asset.phpreviews-frontend.jssingle-product-frontend.asset.phpsingle-product-frontend.jssingle-product.asset.phpsingle-product.jsstock-filter-frontend.asset.phpstock-filter-frontend.jsstock-filter.asset.phpstock-filter.js
vendors--atomic-block-components
add-to-cart--cart-blocks
order-summary--checkout-blocks
add-to-cart-frontend.js
price--cart-blocks
vendors--cart-blocks
line-items--checkout-blocks
order-summary--checkout-blocks
billing-address--checkout-blocks
wc-blocks-data.asset.phpwc-blocks-data.jswc-blocks-editor-style-rtl.csswc-blocks-editor-style.csswc-blocks-google-analytics.asset.phpwc-blocks-google-analytics.jswc-blocks-middleware.asset.phpwc-blocks-middleware.jswc-blocks-registry.asset.phpwc-blocks-registry.jswc-blocks-shared-context.asset.phpwc-blocks-shared-context.jswc-blocks-shared-hocs.asset.phpwc-blocks-shared-hocs.jswc-blocks-style-rtl.csswc-blocks-style.csswc-blocks-vendors-style-rtl.csswc-blocks-vendors-style.csswc-blocks-vendors.jswc-blocks.asset.phpwc-blocks.jswc-payment-method-bacs.asset.phpwc-payment-method-bacs.jswc-payment-method-cheque.asset.phpwc-payment-method-cheque.jswc-payment-method-cod.asset.phpwc-payment-method-cod.jswc-payment-method-paypal.asset.phpwc-payment-method-paypal.jswc-payment-method-stripe.asset.phpwc-payment-method-stripe.jswc-settings.asset.phpwc-settings.js
global.d.ts
images
packages
patches
readme.txt
src
Assets.php
Assets
AssetsController.php
BlockTypes
BlockTypesController.php
Domain
InboxNotifications.phpInstaller.php
Integrations
Library.phpPackage.php
Payments
Registry
RestApi.php
StoreApi
Utils
templates
vendor
autoload.phpautoload_packages.php
automattic
composer
ClassLoader.phpInstalledVersions.phpLICENSEautoload_classmap.phpautoload_namespaces.phpautoload_psr4.phpautoload_real.phpautoload_static.phpinstalled.jsoninstalled.php
installers
LICENSEphpstan.neon.dist
src
Composer
Installers
AglInstaller.phpAimeosInstaller.phpAnnotateCmsInstaller.phpAsgardInstaller.phpAttogramInstaller.phpBaseInstaller.phpBitrixInstaller.phpBonefishInstaller.phpCakePHPInstaller.phpChefInstaller.phpCiviCrmInstaller.phpClanCatsFrameworkInstaller.phpCockpitInstaller.phpCodeIgniterInstaller.phpConcrete5Installer.phpCraftInstaller.phpCroogoInstaller.phpDecibelInstaller.phpDframeInstaller.phpDokuWikiInstaller.phpDolibarrInstaller.phpDrupalInstaller.phpElggInstaller.phpEliasisInstaller.phpExpressionEngineInstaller.phpEzPlatformInstaller.phpFuelInstaller.phpFuelphpInstaller.phpGravInstaller.phpHuradInstaller.phpImageCMSInstaller.phpInstaller.phpItopInstaller.phpJoomlaInstaller.phpKanboardInstaller.phpKirbyInstaller.phpKnownInstaller.phpKodiCMSInstaller.phpKohanaInstaller.phpLanManagementSystemInstaller.phpLaravelInstaller.phpLavaLiteInstaller.phpLithiumInstaller.phpMODULEWorkInstaller.phpMODXEvoInstaller.phpMagentoInstaller.phpMajimaInstaller.phpMakoInstaller.phpMantisBTInstaller.phpMauticInstaller.phpMayaInstaller.phpMediaWikiInstaller.phpMiaoxingInstaller.phpMicroweberInstaller.phpModxInstaller.phpMoodleInstaller.phpOctoberInstaller.phpOntoWikiInstaller.phpOsclassInstaller.phpOxidInstaller.phpPPIInstaller.phpPhiftyInstaller.phpPhpBBInstaller.phpPimcoreInstaller.phpPiwikInstaller.phpPlentymarketsInstaller.phpPlugin.phpPortoInstaller.phpPrestashopInstaller.phpProcessWireInstaller.phpPuppetInstaller.phpPxcmsInstaller.phpRadPHPInstaller.phpReIndexInstaller.phpRedaxo5Installer.phpRedaxoInstaller.phpRoundcubeInstaller.phpSMFInstaller.phpShopwareInstaller.phpSilverStripeInstaller.phpSiteDirectInstaller.phpStarbugInstaller.phpSyDESInstaller.phpSyliusInstaller.phpSymfony1Installer.phpTYPO3CmsInstaller.phpTYPO3FlowInstaller.phpTaoInstaller.phpTastyIgniterInstaller.phpTheliaInstaller.phpTuskInstaller.phpUserFrostingInstaller.phpVanillaInstaller.phpVgmcpInstaller.phpWHMCSInstaller.phpWinterInstaller.phpWolfCMSInstaller.phpWordPressInstaller.phpYawikInstaller.phpZendInstaller.phpZikulaInstaller.php
bootstrap.php
jetpack_autoload_classmap.phpjetpack_autoload_psr4.php
jetpack-autoloader
woocommerce-gutenberg-products-block.php
readme.txt
sample-data
src
templates
archive-product.php
auth
cart
checkout
content-product-cat.phpcontent-product.phpcontent-single-product.phpcontent-widget-price-filter.phpcontent-widget-product.phpcontent-widget-reviews.php
emails
global
loop
myaccount
notices
order
product-searchform.phpsingle-product-reviews.phpsingle-product.php
single-product
taxonomy-product-cat.phptaxonomy-product-tag.php
uninstall.php
vendor
autoload.phpautoload_packages.php
automattic
composer
ClassLoader.phpLICENSEautoload_classmap.phpautoload_namespaces.phpautoload_psr4.phpautoload_real.phpautoload_static.phpinstalled.json
installers
LICENSEphpstan.neon.dist
src
Composer
Installers
AglInstaller.phpAimeosInstaller.phpAnnotateCmsInstaller.phpAsgardInstaller.phpAttogramInstaller.phpBaseInstaller.phpBitrixInstaller.phpBonefishInstaller.phpCakePHPInstaller.phpChefInstaller.phpCiviCrmInstaller.phpClanCatsFrameworkInstaller.phpCockpitInstaller.phpCodeIgniterInstaller.phpConcrete5Installer.phpCraftInstaller.phpCroogoInstaller.phpDecibelInstaller.phpDframeInstaller.phpDokuWikiInstaller.phpDolibarrInstaller.phpDrupalInstaller.phpElggInstaller.phpEliasisInstaller.phpExpressionEngineInstaller.phpEzPlatformInstaller.phpFuelInstaller.phpFuelphpInstaller.phpGravInstaller.phpHuradInstaller.phpImageCMSInstaller.phpInstaller.phpItopInstaller.phpJoomlaInstaller.phpKanboardInstaller.phpKirbyInstaller.phpKnownInstaller.phpKodiCMSInstaller.phpKohanaInstaller.phpLanManagementSystemInstaller.phpLaravelInstaller.phpLavaLiteInstaller.phpLithiumInstaller.phpMODULEWorkInstaller.phpMODXEvoInstaller.phpMagentoInstaller.phpMajimaInstaller.phpMakoInstaller.phpMantisBTInstaller.phpMauticInstaller.phpMayaInstaller.phpMediaWikiInstaller.phpMiaoxingInstaller.phpMicroweberInstaller.phpModxInstaller.phpMoodleInstaller.phpOctoberInstaller.phpOntoWikiInstaller.phpOsclassInstaller.phpOxidInstaller.phpPPIInstaller.phpPantheonInstaller.phpPhiftyInstaller.phpPhpBBInstaller.phpPimcoreInstaller.phpPiwikInstaller.phpPlentymarketsInstaller.phpPlugin.phpPortoInstaller.phpPrestashopInstaller.phpProcessWireInstaller.phpPuppetInstaller.phpPxcmsInstaller.phpRadPHPInstaller.phpReIndexInstaller.phpRedaxo5Installer.phpRedaxoInstaller.phpRoundcubeInstaller.phpSMFInstaller.phpShopwareInstaller.phpSilverStripeInstaller.phpSiteDirectInstaller.phpStarbugInstaller.phpSyDESInstaller.phpSyliusInstaller.phpSymfony1Installer.phpTYPO3CmsInstaller.phpTYPO3FlowInstaller.phpTaoInstaller.phpTastyIgniterInstaller.phpTheliaInstaller.phpTuskInstaller.phpUserFrostingInstaller.phpVanillaInstaller.phpVgmcpInstaller.phpWHMCSInstaller.phpWinterInstaller.phpWolfCMSInstaller.phpWordPressInstaller.phpYawikInstaller.phpZendInstaller.phpZikulaInstaller.php
bootstrap.php
jetpack_autoload_classmap.php
jetpack-autoloader
maxmind-db
pelago
psr
symfony
css-selector
CssSelectorConverter.php
Exception
LICENSE
Node
Parser
Tests
XPath
woocommerce.php

@ -0,0 +1,393 @@
<?php // phpcs:ignore WordPress.Files.FileName
/**
* Autoloader Generator.
*
* @package automattic/jetpack-autoloader
*/
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
// phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
// phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
// phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
// phpcs:disable WordPress.Files.FileName.InvalidClassFileName
// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fopen
// phpcs:disable WordPress.WP.AlternativeFunctions.file_system_read_fwrite
// phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
namespace Automattic\Jetpack\Autoloader;
use Composer\Autoload\ClassMapGenerator;
use Composer\Composer;
use Composer\Config;
use Composer\Installer\InstallationManager;
use Composer\IO\IOInterface;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Util\Filesystem;
use Composer\Util\PackageSorter;
/**
* Class AutoloadGenerator.
*/
class AutoloadGenerator {
/**
* The filesystem utility.
*
* @var Filesystem
*/
private $filesystem;
/**
* Instantiate an AutoloadGenerator object.
*
* @param IOInterface $io IO object.
*/
public function __construct( IOInterface $io = null ) {
$this->io = $io;
$this->filesystem = new Filesystem();
}
/**
* Dump the Jetpack autoloader files.
*
* @param Composer $composer The Composer object.
* @param Config $config Config object.
* @param InstalledRepositoryInterface $localRepo Installed Repository object.
* @param PackageInterface $mainPackage Main Package object.
* @param InstallationManager $installationManager Manager for installing packages.
* @param string $targetDir Path to the current target directory.
* @param bool $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
* @param string $suffix The autoloader suffix.
*/
public function dump(
Composer $composer,
Config $config,
InstalledRepositoryInterface $localRepo,
PackageInterface $mainPackage,
InstallationManager $installationManager,
$targetDir,
$scanPsrPackages = false,
$suffix = null
) {
$this->filesystem->ensureDirectoryExists( $config->get( 'vendor-dir' ) );
$packageMap = $composer->getAutoloadGenerator()->buildPackageMap( $installationManager, $mainPackage, $localRepo->getCanonicalPackages() );
$autoloads = $this->parseAutoloads( $packageMap, $mainPackage );
// Convert the autoloads into a format that the manifest generator can consume more easily.
$basePath = $this->filesystem->normalizePath( realpath( getcwd() ) );
$vendorPath = $this->filesystem->normalizePath( realpath( $config->get( 'vendor-dir' ) ) );
$processedAutoloads = $this->processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath );
unset( $packageMap, $autoloads );
// Make sure none of the legacy files remain that can lead to problems with the autoloader.
$this->removeLegacyFiles( $vendorPath );
// Write all of the files now that we're done.
$this->writeAutoloaderFiles( $vendorPath . '/jetpack-autoloader/', $suffix );
$this->writeManifests( $vendorPath . '/' . $targetDir, $processedAutoloads );
if ( ! $scanPsrPackages ) {
$this->io->writeError( '<warning>You are generating an unoptimized autoloader. If this is a production build, consider using the -o option.</warning>' );
}
}
/**
* Compiles an ordered list of namespace => path mappings
*
* @param array $packageMap Array of array(package, installDir-relative-to-composer.json).
* @param PackageInterface $mainPackage Main package instance.
*
* @return array The list of path mappings.
*/
public function parseAutoloads( array $packageMap, PackageInterface $mainPackage ) {
$rootPackageMap = array_shift( $packageMap );
$sortedPackageMap = $this->sortPackageMap( $packageMap );
$sortedPackageMap[] = $rootPackageMap;
array_unshift( $packageMap, $rootPackageMap );
$psr0 = $this->parseAutoloadsType( $packageMap, 'psr-0', $mainPackage );
$psr4 = $this->parseAutoloadsType( $packageMap, 'psr-4', $mainPackage );
$classmap = $this->parseAutoloadsType( array_reverse( $sortedPackageMap ), 'classmap', $mainPackage );
$files = $this->parseAutoloadsType( $sortedPackageMap, 'files', $mainPackage );
krsort( $psr0 );
krsort( $psr4 );
return array(
'psr-0' => $psr0,
'psr-4' => $psr4,
'classmap' => $classmap,
'files' => $files,
);
}
/**
* Sorts packages by dependency weight
*
* Packages of equal weight retain the original order
*
* @param array $packageMap The package map.
*
* @return array
*/
protected function sortPackageMap( array $packageMap ) {
$packages = array();
$paths = array();
foreach ( $packageMap as $item ) {
list( $package, $path ) = $item;
$name = $package->getName();
$packages[ $name ] = $package;
$paths[ $name ] = $path;
}
$sortedPackages = PackageSorter::sortPackages( $packages );
$sortedPackageMap = array();
foreach ( $sortedPackages as $package ) {
$name = $package->getName();
$sortedPackageMap[] = array( $packages[ $name ], $paths[ $name ] );
}
return $sortedPackageMap;
}
/**
* Returns the file identifier.
*
* @param PackageInterface $package The package instance.
* @param string $path The path.
*/
protected function getFileIdentifier( PackageInterface $package, $path ) {
return md5( $package->getName() . ':' . $path );
}
/**
* Returns the path code for the given path.
*
* @param Filesystem $filesystem The filesystem instance.
* @param string $basePath The base path.
* @param string $vendorPath The vendor path.
* @param string $path The path.
*
* @return string The path code.
*/
protected function getPathCode( Filesystem $filesystem, $basePath, $vendorPath, $path ) {
if ( ! $filesystem->isAbsolutePath( $path ) ) {
$path = $basePath . '/' . $path;
}
$path = $filesystem->normalizePath( $path );
$baseDir = '';
if ( 0 === strpos( $path . '/', $vendorPath . '/' ) ) {
$path = substr( $path, strlen( $vendorPath ) );
$baseDir = '$vendorDir';
if ( false !== $path ) {
$baseDir .= ' . ';
}
} else {
$path = $filesystem->normalizePath( $filesystem->findShortestPath( $basePath, $path, true ) );
if ( ! $filesystem->isAbsolutePath( $path ) ) {
$baseDir = '$baseDir . ';
$path = '/' . $path;
}
}
if ( strpos( $path, '.phar' ) !== false ) {
$baseDir = "'phar://' . " . $baseDir;
}
return $baseDir . ( ( false !== $path ) ? var_export( $path, true ) : '' );
}
/**
* This function differs from the composer parseAutoloadsType in that beside returning the path.
* It also return the path and the version of a package.
*
* Supports PSR-4, PSR-0, and classmap parsing.
*
* @param array $packageMap Map of all the packages.
* @param string $type Type of autoloader to use.
* @param PackageInterface $mainPackage Instance of the Package Object.
*
* @return array
*/
protected function parseAutoloadsType( array $packageMap, $type, PackageInterface $mainPackage ) {
$autoloads = array();
foreach ( $packageMap as $item ) {
list($package, $installPath) = $item;
$autoload = $package->getAutoload();
if ( $package === $mainPackage ) {
$autoload = array_merge_recursive( $autoload, $package->getDevAutoload() );
}
if ( null !== $package->getTargetDir() && $package !== $mainPackage ) {
$installPath = substr( $installPath, 0, -strlen( '/' . $package->getTargetDir() ) );
}
if ( in_array( $type, array( 'psr-4', 'psr-0' ), true ) && isset( $autoload[ $type ] ) && is_array( $autoload[ $type ] ) ) {
foreach ( $autoload[ $type ] as $namespace => $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[ $namespace ][] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
);
}
}
}
if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) {
foreach ( $autoload['classmap'] as $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
);
}
}
}
if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) {
foreach ( $autoload['files'] as $paths ) {
$paths = is_array( $paths ) ? $paths : array( $paths );
foreach ( $paths as $path ) {
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path;
$autoloads[ $this->getFileIdentifier( $package, $path ) ] = array(
'path' => $relativePath,
'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it?
);
}
}
}
}
return $autoloads;
}
/**
* Given Composer's autoloads this will convert them to a version that we can use to generate the manifests.
*
* When the $scanPsrPackages argument is true, PSR-4 namespaces are converted to classmaps. When $scanPsrPackages
* is false, PSR-4 namespaces are not converted to classmaps.
*
* PSR-0 namespaces are always converted to classmaps.
*
* @param array $autoloads The autoloads we want to process.
* @param bool $scanPsrPackages Whether or not PSR-4 packages should be converted to a classmap.
* @param string $vendorPath The path to the vendor directory.
* @param string $basePath The path to the current directory.
*
* @return array $processedAutoloads
*/
private function processAutoloads( $autoloads, $scanPsrPackages, $vendorPath, $basePath ) {
$processor = new AutoloadProcessor(
function ( $path, $excludedClasses, $namespace ) use ( $basePath ) {
$dir = $this->filesystem->normalizePath(
$this->filesystem->isAbsolutePath( $path ) ? $path : $basePath . '/' . $path
);
return ClassMapGenerator::createMap(
$dir,
$excludedClasses,
null, // Don't pass the IOInterface since the normal autoload generation will have reported already.
empty( $namespace ) ? null : $namespace
);
},
function ( $path ) use ( $basePath, $vendorPath ) {
return $this->getPathCode( $this->filesystem, $basePath, $vendorPath, $path );
}
);
return array(
'psr-4' => $processor->processPsr4Packages( $autoloads, $scanPsrPackages ),
'classmap' => $processor->processClassmap( $autoloads, $scanPsrPackages ),
'files' => $processor->processFiles( $autoloads ),
);
}
/**
* Removes all of the legacy autoloader files so they don't cause any problems.
*
* @param string $outDir The directory legacy files are written to.
*/
private function removeLegacyFiles( $outDir ) {
$files = array(
'autoload_functions.php',
'class-autoloader-handler.php',
'class-classes-handler.php',
'class-files-handler.php',
'class-plugins-handler.php',
'class-version-selector.php',
);
foreach ( $files as $file ) {
$this->filesystem->remove( $outDir . '/' . $file );
}
}
/**
* Writes all of the autoloader files to disk.
*
* @param string $outDir The directory to write to.
* @param string $suffix The unique autoloader suffix.
*/
private function writeAutoloaderFiles( $outDir, $suffix ) {
$this->io->writeError( "<info>Generating jetpack autoloader ($outDir)</info>" );
// We will remove all autoloader files to generate this again.
$this->filesystem->emptyDirectory( $outDir );
// Write the autoloader files.
AutoloadFileWriter::copyAutoloaderFiles( $this->io, $outDir, $suffix );
}
/**
* Writes all of the manifest files to disk.
*
* @param string $outDir The directory to write to.
* @param array $processedAutoloads The processed autoloads.
*/
private function writeManifests( $outDir, $processedAutoloads ) {
$this->io->writeError( "<info>Generating jetpack autoloader manifests ($outDir)</info>" );
$manifestFiles = array(
'classmap' => 'jetpack_autoload_classmap.php',
'psr-4' => 'jetpack_autoload_psr4.php',
'files' => 'jetpack_autoload_filemap.php',
);
foreach ( $manifestFiles as $key => $file ) {
// Make sure the file doesn't exist so it isn't there if we don't write it.
$this->filesystem->remove( $outDir . '/' . $file );
if ( empty( $processedAutoloads[ $key ] ) ) {
continue;
}
$content = ManifestGenerator::buildManifest( $key, $file, $processedAutoloads[ $key ] );
if ( empty( $content ) ) {
continue;
}
if ( file_put_contents( $outDir . '/' . $file, $content ) ) {
$this->io->writeError( " <info>Generated: $file</info>" );
} else {
$this->io->writeError( " <error>Error: $file</error>" );
}
}
}
}