first commit

This commit is contained in:
User A0264400
2026-04-01 23:20:16 +03:00
commit a766acdc90
23071 changed files with 4933189 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the catalog visibility values.
*/
final class CatalogVisibility {
/**
* Product is visible on both shop and search results.
*
* @var string
*/
public const VISIBLE = 'visible';
/**
* Product is visible on the shop page only.
*/
public const CATALOG = 'catalog';
/**
* Product visible in the search results only.
*/
public const SEARCH = 'search';
/**
* Product is invisible on both shop and search results, but can still be accessed directly.
*/
public const HIDDEN = 'hidden';
}

View File

@@ -0,0 +1,42 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for feature plugin compatibility.
*/
final class FeaturePluginCompatibility {
/**
* Plugins are compatible by default with the feature.
*
* @var string
*/
public const COMPATIBLE = 'compatible';
/**
* Plugins are incompatible by default with the feature.
*
* @var string
*/
public const INCOMPATIBLE = 'incompatible';
/**
* Plugin compatibility with the feautre is yet to be determined. Internal use only.
*
* @internal
* @var string
*/
public const UNCERTAIN = 'uncertain';
/**
* Valid values for registration of feature compatibility.
*
* @var string[]
*/
public const VALID_REGISTRATION_VALUES = array(
self::COMPATIBLE,
self::INCOMPATIBLE,
);
}

View File

@@ -0,0 +1,60 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the internal order statuses.
* These statuses are used internally by WooCommerce to query database directly.
*/
final class OrderInternalStatus {
/**
* The order is pending payment.
*
* @var string
*/
public const PENDING = 'wc-pending';
/**
* The order is processing.
*
* @var string
*/
public const PROCESSING = 'wc-processing';
/**
* The order is on hold.
*
* @var string
*/
public const ON_HOLD = 'wc-on-hold';
/**
* The order is completed.
*
* @var string
*/
public const COMPLETED = 'wc-completed';
/**
* The order is cancelled.
*
* @var string
*/
public const CANCELLED = 'wc-cancelled';
/**
* The order is refunded.
*
* @var string
*/
public const REFUNDED = 'wc-refunded';
/**
* The order is failed.
*
* @var string
*/
public const FAILED = 'wc-failed';
}

View File

@@ -0,0 +1,109 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the order statuses.
*
* For a full documentation on the public order statuses, please refer to the following link:
* https://woocommerce.com/document/managing-orders/order-statuses/
*/
final class OrderStatus {
/**
* The order has been received, but no payment has been made.
*
* @var string
*/
public const PENDING = 'pending';
/**
* The customers payment failed or was declined, and no payment has been successfully made.
*
* @var string
*/
public const FAILED = 'failed';
/**
* The order is awaiting payment confirmation.
*
* @var string
*/
public const ON_HOLD = 'on-hold';
/**
* Order fulfilled and complete.
*
* @var string
*/
public const COMPLETED = 'completed';
/**
* Payment has been received (paid), and the stock has been reduced.
*
* @var string
*/
public const PROCESSING = 'processing';
/**
* Orders are automatically put in the Refunded status when an admin or shop manager has fully refunded the orders value after payment.
*
* @var string
*/
public const REFUNDED = 'refunded';
/**
* The order was canceled by an admin or the customer.
*
* @var string
*/
public const CANCELLED = 'cancelled';
/**
* The order is in the trash.
*
* @var string
*/
public const TRASH = 'trash';
/**
* The order is a draft (legacy status).
*
* @var string
*/
public const NEW = 'new';
/**
* The order is an automatically generated draft.
*
* @var string
*/
public const AUTO_DRAFT = 'auto-draft';
/**
* Draft orders are created when customers start the checkout process while the block version of the checkout is in place.
*
* @var string
*/
public const DRAFT = 'draft';
/**
* Checkout Draft orders are created when customers start the checkout process while the block version of the checkout is in place.
*
* @var string
*/
public const CHECKOUT_DRAFT = 'checkout-draft';
/**
* Array of all the valid order statuses for a complete payment.
*
* @var string[]
*/
public const PAYMENT_COMPLETE_STATUSES = array(
self::ON_HOLD,
self::PENDING,
self::FAILED,
self::CANCELLED,
);
}

View File

@@ -0,0 +1,148 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the payment gateway feature's values.
*/
final class PaymentGatewayFeature {
/**
* Payment gateway supports add payment methods.
*
* @var string
*/
public const ADD_PAYMENT_METHOD = 'add_payment_method';
/**
* Payment gateway supports credit card form on saved method.
*
* @var string
*/
public const CREDIT_CARD_FORM_CVC_ON_SAVED_METHOD = 'credit_card_form_cvc_on_saved_method';
/**
* Payment gateway supports default credit card form.
*
* @var string
*/
public const DEFAULT_CREDIT_CARD_FORM = 'default_credit_card_form';
/**
* Payment gateway supports deposits.
*
* @var string
*/
public const DEPOSITS = 'deposits';
/**
* Payment gateway supports multiple subscriptions.
*
* @var string
*/
public const MULTIPLE_SUBSCRIPTIONS = 'multiple_subscriptions';
/**
* Payment gateway supports pay button.
*
* @var string
*/
public const PAY_BUTTON = 'pay_button';
/**
* Payment gateway supports pre-orders.
*
* @var string
*/
public const PRE_ORDERS = 'pre-orders';
/**
* Payment gateway supports products.
*
* @var string
*/
public const PRODUCTS = 'products';
/**
* Payment gateway supports refunds.
*
* @var string
*/
public const REFUNDS = 'refunds';
/**
* Payment gateway supports subscription amount changes.
*
* @var string
*/
public const SUBSCRIPTION_AMOUNT_CHANGES = 'subscription_amount_changes';
/**
* Payment gateway supports subscription cancellation.
*
* @var string
*/
public const SUBSCRIPTION_CANCELLATION = 'subscription_cancellation';
/**
* Payment gateway supports subscription date changes.
*
* @var string
*/
public const SUBSCRIPTION_DATE_CHANGES = 'subscription_date_changes';
/**
* Payment gateway supports subscription payment method changes.
*
* @var string
*/
public const SUBSCRIPTION_PAYMENT_METHOD_CHANGE = 'subscription_payment_method_change';
/**
* Payment gateway supports subscription payment method changes by admin.
*
* @var string
*/
public const SUBSCRIPTION_PAYMENT_METHOD_CHANGE_ADMIN = 'subscription_payment_method_change_admin';
/**
* Payment gateway supports subscription payment method changes by customer or admin.
*
* @var string
*/
public const SUBSCRIPTION_PAYMENT_METHOD_CHANGE_CUSTOMER = 'subscription_payment_method_change_customer';
/**
* Payment gateway supports subscription reactivation.
*
* @var string
*/
public const SUBSCRIPTION_REACTIVATION = 'subscription_reactivation';
/**
* Payment gateway supports subscription suspension.
*
* @var string
*/
public const SUBSCRIPTION_SUSPENSION = 'subscription_suspension';
/**
* Payment gateway supports subscriptions.
*
* @var string
*/
public const SUBSCRIPTIONS = 'subscriptions';
/**
* Payment gateway supports tokenization.
*
* @var string
*/
public const TOKENIZATION = 'tokenization';
/**
* Agentic Commerce feature.
*/
public const AGENTIC_COMMERCE = 'agentic_commerce';
}

View File

@@ -0,0 +1,59 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the product statuses.
*/
final class ProductStatus {
/**
* The product is in auto-draft status.
*
* @var string
*/
public const AUTO_DRAFT = 'auto-draft';
/**
* The product is in draft status.
*
* @var string
*/
public const DRAFT = 'draft';
/**
* The product is in pending status.
*
* @var string
*/
public const PENDING = 'pending';
/**
* The product is in private status.
*
* @var string
*/
public const PRIVATE = 'private';
/**
* The product is in publish status.
*
* @var string
*/
public const PUBLISH = 'publish';
/**
* The product is in trash status.
*
* @var string
*/
public const TRASH = 'trash';
/**
* The product is in future status.
*
* @var string
*/
public const FUTURE = 'future';
}

View File

@@ -0,0 +1,38 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the product stock statuses.
*/
final class ProductStockStatus {
/**
* The product is in stock.
*
* @var string
*/
public const IN_STOCK = 'instock';
/**
* The product is out of stock.
*
* @var string
*/
public const OUT_OF_STOCK = 'outofstock';
/**
* The product is on backorder.
*
* @var string
*/
public const ON_BACKORDER = 'onbackorder';
/**
* The product is low in stock.
*
* @var string
*/
public const LOW_STOCK = 'lowstock';
}

View File

@@ -0,0 +1,31 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the product tax statuses.
*/
class ProductTaxStatus {
/**
* Tax status for products that are taxable.
*
* @var string
*/
public const TAXABLE = 'taxable';
/**
* Indicates that only the shipping cost should be taxed, not the product itself.
*
* @var string
*/
public const SHIPPING = 'shipping';
/**
* Tax status for products that are not taxable.
*
* @var string
*/
public const NONE = 'none';
}

View File

@@ -0,0 +1,45 @@
<?php
declare( strict_types = 1 );
namespace Automattic\WooCommerce\Enums;
/**
* Enum class for all the product types.
*/
final class ProductType {
/**
* Simple product type.
*
* @var string
*/
public const SIMPLE = 'simple';
/**
* Variable product type.
*
* @var string
*/
public const VARIABLE = 'variable';
/**
* Grouped product type.
*
* @var string
*/
public const GROUPED = 'grouped';
/**
* External/Affiliate product type.
*
* @var string
*/
public const EXTERNAL = 'external';
/**
* Variation product type.
*
* @var string
*/
public const VARIATION = 'variation';
}