= 1) and per-page (1–100). */ protected static function pagination(array $input): array { } /** * Shared permission callback: store admins pass; everyone else must be a vendor and hold the * ability's declared capability. * * Vendor staff resolve to their parent vendor for data scope but keep their own, narrower set * of `dokan_*` capabilities — so scope alone is not authorization. Without this check a staff * member reaches vendor data their assigned permissions exclude. * * @since 5.0.15 * * @return bool */ public static function check_permission(): bool { } /** * A standard "not a vendor" error. * * @since 5.0.15 * * @return WP_Error */ protected static function forbidden(): \WP_Error { } /** * Guard an execute callback. * * Repeats {@see self::check_permission()} inside `execute()` rather than trusting the * permission callback alone, because an ability's callbacks are public and reachable without * the Abilities API running its own permission pre-flight. * * @since 5.0.15 * * @return WP_Error|null Error when the caller is not permitted, null otherwise. */ protected static function guard(): ?\WP_Error { } /** * Base ability metadata shared by Dokan abilities. * * @since 5.0.15 * * @param bool $is_readonly Whether the ability only reads data. * * @return array */ protected static function base_meta(bool $is_readonly): array { } } /** * Ability: resolve the current Dokan identity ("who am I"). * * Lets an MCP orchestrator answer questions like "my products" by first discovering whether the * authenticated user is a vendor, vendor staff, or a store admin, and which store they act for. * When the caller is a vendor or staff, the catalog/order abilities are already scoped to that * store automatically. * * @since 5.0.15 */ class CurrentVendor extends \WeDevs\Dokan\Abilities\Definitions\AbstractVendorAbility { /** * Ability name. * * @since 5.0.15 * * @return string */ public static function get_name(): string { } /** * Ability registration arguments. * * @since 5.0.15 * * @return array */ public static function get_registration_args(): array { } /** * Execute the ability. * * @since 5.0.15 * * @param array $input Ability input. * * @return array */ public static function execute(array $input) { } } /** * Ability: get the current vendor's high-level stats (balance + withdraw summary). * * @since 5.0.15 */ class VendorStatsGet extends \WeDevs\Dokan\Abilities\Definitions\AbstractVendorAbility { /** * Ability name. * * @since 5.0.15 * * @return string */ public static function get_name(): string { } /** * Ability registration arguments. * * @since 5.0.15 * * @return array */ public static function get_registration_args(): array { } /** * Balance and earnings are gated on the sales-overview capability. * * @since 5.0.15 * * @return string */ protected static function required_capability(): string { } /** * Execute the ability. * * @since 5.0.15 * * @param array $input Ability input. * * @return array|\WP_Error */ public static function execute(array $input) { } } /** * Ability: list / search vendors. * * Lets an admin or shop manager discover the vendor to assign a product to (the `vendor_id` * consumed by the product-create abilities), and backs the public store directory. * * Listing approved vendors is public; listing pending ones is restricted to store managers. * * @since 5.0.15 */ class VendorsQuery extends \WeDevs\Dokan\Abilities\Definitions\AbstractVendorAbility { /** * Ability name. * * @since 5.0.15 * * @return string */ public static function get_name(): string { } /** * Ability registration arguments. * * @since 5.0.15 * * @return array */ public static function get_registration_args(): array { } /** * Resolve the vendor status a caller is allowed to list. * * A vendor awaiting approval has not been accepted into the marketplace and is not public * information, so `pending` and `all` are restricted to Store Admins. Other callers are * coerced to `approved` rather than rejected, keeping the public directory usable. * * @since 5.0.15 * * @param array $input Ability input. * * @return string One of `approved`, `pending`, `all`. */ protected static function resolve_status(array $input): string { } /** * Execute the ability. * * @since 5.0.15 * * @param array $input Ability input. * * @return array|\WP_Error */ public static function execute(array $input) { } } /** * Ability: list the current vendor's withdrawal requests. * * @since 5.0.15 */ class WithdrawsQuery extends \WeDevs\Dokan\Abilities\Definitions\AbstractVendorAbility { /** * Ability name. * * @since 5.0.15 * * @return string */ public static function get_name(): string { } /** * Ability registration arguments. * * @since 5.0.15 * * @return array */ public static function get_registration_args(): array { } /** * Withdrawal records are gated on the withdraw capability. * * @since 5.0.15 * * @return string */ protected static function required_capability(): string { } /** * Execute the ability. * * @since 5.0.15 * * @param array $input Ability input. * * @return array|\WP_Error */ public static function execute(array $input) { } } } namespace WeDevs\Dokan\Contracts { /** * Interface HooksRegisterInterface * This interface should be implemented by all classes that use WordPress hooks with the Dependency Management Container. * Implementing this interface ensures that the hooks are registered automatically. * If this interface is not implemented, the hooks must be registered manually by resolving the container. */ interface Hookable { /** * Register hooks for WordPress. * This method will be called automatically to register the hooks. * * @return void */ public function register_hooks(): void; } } namespace WeDevs\Dokan\Abilities { /** * Registers Dokan-native abilities with the WordPress Abilities API. * * Dokan exposes vendor-scoped abilities (withdrawals, vendor stats, …) for resources WooCommerce * does not model. Registration uses WooCommerce 10.9's public `woocommerce_ability_definition_classes` * filter, so the abilities are picked up by the same Abilities API / MCP surface as WooCommerce's own, * without depending on any WooCommerce internal class. * * The ability classes implement WooCommerce's public AbilityDefinition interface; because they are only * autoloaded when that filter runs (which only happens when WooCommerce 10.9+ is active), nothing here * fatals on older WooCommerce. * * @since 5.0.15 */ class DokanAbilityRegistrar implements \WeDevs\Dokan\Contracts\Hookable { /** * Register hooks. * * @since 5.0.15 * * @return void */ public function register_hooks(): void { } /** * Register the `dokan` ability category. * * @since 5.0.15 * * @return void */ public function register_category(): void { } /** * Append Dokan ability definition classes. * * @since 5.0.15 * * @param array $classes Ability definition class names. * * @return array */ public function register_definition_classes($classes): array { } /** * Dokan ability definition class names. * * @since 5.0.15 * * @return string[] */ private function ability_classes(): array { } } /** * Vendor-scopes WooCommerce order abilities for multivendor sites. * * WooCommerce 10.9.0 registers order abilities in two layers, both of which run as the * authenticated user and act on the whole store: * * - Layer 1 (deprecated REST proxy): `woocommerce/orders-*` re-dispatch standard WC REST * requests via `rest_do_request()`. * - Layer 2 (domain abilities): `woocommerce/orders-query`, `order-add-note`, * `order-update-status` call WC CRUD directly. * * Rather than re-implementing any ability, this class makes BOTH layers vendor-safe through * cross-cutting, public seams: * * - Per-object permission: `woocommerce_rest_check_permissions` keeps orders private to the * owning vendor (admins unscoped). * - List scoping: the WC order data-store (legacy CPT + HPOS) and REST query filters constrain * order listings to the current vendor's orders. * - In-place extension: order-list output is annotated with the Dokan parent / Suborder * relationship and owning vendor, so totals can be summed without double-counting a parent and * its Suborders. * * In Dokan a multi-vendor order is split into a parent (full amount) and one Suborder per vendor * (their portion); a single-vendor order is not split. A vendor owns their Suborders / single * orders, never the parent. * * Everything is gated to (Ability Context && vendor) so normal storefront / admin / REST traffic * is untouched, and store admins (manage_woocommerce) stay unscoped. * * @since 5.0.15 */ class OrderAbilityScope implements \WeDevs\Dokan\Contracts\Hookable { /** * Cached vendor order IDs for the current request. * * @var int[]|null */ private ?array $vendor_order_ids = null; /** * Re-entrancy guard while resolving the vendor order IDs. * * Resolving the IDs runs `dokan()->order->all()`, which re-triggers the order query * filters below; this prevents recursion / double scoping. * * @var bool */ private bool $resolving_order_ids = false; /** * WooCommerce order abilities whose output is enriched with Dokan order relationships. * * Both layers are named: `/woocommerce/mcp` exposes only the Layer 1 (REST proxy) abilities, * while Layer 2 is reached through the abilities REST API and third-party MCP servers. Naming * one layer only would leave the annotation inert on whichever surface a client happens to use. * * @var string[] */ private const ORDER_OUTPUT_ABILITIES = [ // Layer 2. 'woocommerce/orders-query', // Layer 1. 'woocommerce/orders-list', 'woocommerce/orders-get', 'woocommerce/orders-create', 'woocommerce/orders-update', ]; /** * Register hooks. * * @since 5.0.15 * * @return void */ public function register_hooks(): void { } /** * Keep orders private to the owning vendor on per-object WooCommerce REST permission checks. * * Governs `wc_rest_check_post_permissions()` for shop orders. Reads are allowed at the * collection level (rows are scoped by the order query) and for a vendor's own orders. * * Writes go through {@see OwnershipGate}, which asserts ownership here rather than delegating * to WooCommerce. Native capabilities do **not** deny cross-vendor order writes: with this * filter removed, `wc_rest_check_post_permissions( 'shop_order', 'edit', $foreign )` returns * `true`. This class is load-bearing — see ADR-0006. * * @since 5.0.15 * * @param bool $permission Whether the action is currently permitted. * @param string $context Request context: read, create, edit, delete, batch. * @param int $object_id Target object ID (0 for collection-level checks). * @param string $post_type Post type being checked. * * @return bool */ public function scope_order_permissions($permission, $context, $object_id, $post_type) { } /** * Permission for a single order: private to the owning vendor (admins unscoped). * * @since 5.0.15 * * @param bool $permission Incoming permission. * @param string $context Request context. * @param int $object_id Order ID (0 for collection-level checks). * * @return bool */ private function scope_order_permission($permission, $context, $object_id) { } /** * Scope an order query (Layer 2, legacy CPT or HPOS) to the current vendor's orders. * * @since 5.0.15 * * @param array $query Query args passed to the order data store. * * @return array */ public function scope_orders_query($query) { } /** * Scope a Layer 1 (REST proxy) order query to the current vendor's orders. * * @since 5.0.15 * * @param array $args Query args for the orders REST controller. * * @return array */ public function scope_rest_orders_query($args) { } /** * Annotate a WooCommerce order-list ability with Dokan order relationships in place. * * Adds `parent_id`, `order_relation` and the owning `vendor` to each returned order without * touching the ability itself, so an MCP client can list parents and Suborders together yet * still total amounts without double-counting (a parent's total equals the sum of its * Suborders). * * @since 5.0.15 * * @param array $args Ability registration arguments. * @param string $name Ability name. * * @return array */ public function extend_order_abilities($args, $name) { } /** * Add the Dokan order-relationship properties to an order-list output schema. * * @since 5.0.15 * * @param array $args Ability registration arguments. * * @return array */ private function inject_order_output_schema(array $args): array { } /** * The Dokan order-relationship properties added to an order output schema. * * @since 5.0.15 * * @return array */ private function order_annotation_schema(): array { } /** * Enrich an order-list ability result with Dokan order relationships. * * @since 5.0.15 * * @param mixed $result Ability result. * * @return mixed */ private function enrich_order_result($result) { } /** * Attach the Dokan relationship and owning vendor to a single order payload. * * @since 5.0.15 * * @param mixed $order_data Order payload. * * @return mixed */ public function add_relationship_to_order($order_data) { } /** * Resolve and cache the current vendor's order IDs. * * Returns `[ 0 ]` when the vendor has no orders so callers force an empty result set. * * @since 5.0.15 * * @return int[] */ private function get_vendor_order_ids(): array { } } /** * Vendor-scopes WooCommerce product abilities for multivendor sites. * * WooCommerce 10.9.0 registers product abilities in two layers, both of which run as the * authenticated user and act on the whole store: * * - Layer 1 (deprecated REST proxy): `woocommerce/products-*` re-dispatch standard WC REST * requests via `rest_do_request()`. * - Layer 2 (domain abilities): `woocommerce/products-query`, `product-create|update|delete` * call WC CRUD directly. * * Rather than re-implementing any ability, this class makes BOTH layers vendor-safe through * cross-cutting, public seams: * * - Per-object permission: `woocommerce_rest_check_permissions` enforces the public / private * boundary — published products are public, unpublished ones are owner / admin only. * - List scoping: the WC product data-store and REST query filters apply the optional `vendor_id` * filter and a published-only guard. * - In-place extension: the product-create abilities gain a `vendor_id` selector, and product * output is enriched with the owning vendor. * * Everything is gated to (Ability Context && vendor) so normal storefront / admin / REST traffic * is untouched, and store admins (manage_woocommerce) stay unscoped. * * @since 5.0.15 */ class ProductAbilityScope implements \WeDevs\Dokan\Contracts\Hookable { /** * Vendor a product currently being created should be authored to. * * Set while a product-create ability runs so the `woocommerce_new_product` handler authors * the new product to the resolved vendor. `0` means "do not force" (use default behavior). * * @var int */ private int $forced_product_author = 0; /** * Author (vendor) to constrain the in-progress product query to. `0` means no constraint. * * @var int */ private int $forced_query_author = 0; /** * Whether the in-progress product query must be limited to published products. * * @var bool */ private bool $force_published_only = false; /** * WooCommerce product-create ability names this class extends in place. * * @var string[] */ private const PRODUCT_CREATE_ABILITIES = ['woocommerce/products-create', 'woocommerce/product-create']; /** * WooCommerce product-list ability names that gain an optional `vendor_id` filter. * * Both layers are named: `/woocommerce/mcp` exposes only the Layer 1 (REST proxy) abilities, * while Layer 2 is reached through the abilities REST API and third-party MCP servers. Naming * one layer only would leave the filter inert on whichever surface a client happens to use. * * @var string[] */ private const PRODUCT_FILTER_ABILITIES = [ 'woocommerce/products-query', // Layer 2. 'woocommerce/products-list', ]; /** * WooCommerce product abilities whose output is enriched with the owning vendor. * * @var string[] */ private const PRODUCT_OUTPUT_ABILITIES = [ // Layer 2. 'woocommerce/products-query', 'woocommerce/product-create', 'woocommerce/product-update', // Layer 1. 'woocommerce/products-list', 'woocommerce/products-get', 'woocommerce/products-create', 'woocommerce/products-update', ]; /** * Register hooks. * * @since 5.0.15 * * @return void */ public function register_hooks(): void { } /** * Enforce the public / private boundary on per-object WooCommerce product permission checks. * * Governs `wc_rest_check_post_permissions()` for products. Published products are public (any * caller may read one by ID); unpublished products are readable only by their owner or a store * admin. * * Writes go through {@see OwnershipGate}. Native capabilities happen to deny cross-vendor * product writes today, but the equivalent order check does not — so ownership is asserted * rather than delegated, and the gate additionally grants vendor staff the writes their * `dokan_*` capabilities allow but `edit_others_products` refuses. See ADR-0006 and ADR-0007. * * @since 5.0.15 * * @param bool $permission Whether the action is currently permitted. * @param string $context Request context: read, create, edit, delete, batch. * @param int $object_id Target object ID (0 for collection-level checks). * @param string $post_type Post type being checked. * * @return bool */ public function scope_product_permissions($permission, $context, $object_id, $post_type) { } /** * Permission for a single product: published is public; otherwise owner or admin only. * * @since 5.0.15 * * @param bool $permission Incoming permission. * @param string $context Request context. * @param int $object_id Product ID (0 for collection-level checks). * * @return bool */ private function scope_product_permission($permission, $context, $object_id) { } /** * Apply the active product-query scope (vendor_id filter + published-only guard). * * Both the data-store and REST product query filters route through here. The scope is only * set while a `products-query` ability runs, so other product queries are untouched. * * @since 5.0.15 * * @param mixed $query Query args. * * @return mixed */ private function apply_product_query_scope($query) { } /** * Scope a Layer 2 (CRUD) product query. * * @since 5.0.15 * * @param array $query WP_Query args built by the product data store. * * @return array */ public function scope_products_query($query) { } /** * Scope a Layer 1 (REST proxy) product query. * * @since 5.0.15 * * @param array $args WP_Query args for the products REST controller. * * @return array */ public function scope_rest_products_query($args) { } /** * Author an ability-created product to the resolved vendor. * * WooCommerce authors new products to `get_current_user_id()`, which is correct for a * vendor but not for vendor staff (who act on behalf of their parent vendor) or for an * admin who selected a specific vendor. A forced author (set while a product-create ability * runs) takes precedence; otherwise vendor/staff get their own store. Only writes when the * author differs, so the common case is a no-op. * * @since 5.0.15 * * @param int $product_id Newly created product ID. * * @return void */ public function assign_vendor_as_product_author($product_id) { } /** * Extend WooCommerce's own product abilities with a vendor selector, filter and output. * * Adds an optional `vendor_id` to the input schema and wraps the execute callback so the * created product is authored to the chosen vendor, the list query honors the vendor filter, * and the output carries the owning vendor. The ability id and registration are left intact, * so other consumers keep working; only behavior is augmented. * * @since 5.0.15 * * @param array $args Ability registration arguments. * @param string $name Ability name. * * @return array */ public function extend_product_abilities($args, $name) { } /** * Add the optional `vendor_id` filter property to a product-list input schema. * * @since 5.0.15 * * @param array $args Ability registration arguments. * * @return array */ private function inject_vendor_filter_schema(array $args): array { } /** * Add the `vendor_id` property to a product-create input schema. * * Handles both a flat object schema (Layer 1) and a `oneOf` branch schema (Layer 2), where * each branch declares `additionalProperties: false` and so must list the field itself. * * @since 5.0.15 * * @param array $args Ability registration arguments. * * @return array */ private function inject_vendor_id_schema(array $args): array { } /** * Run a wrapped product ability: assign the vendor on create, enrich the vendor on output. * * @since 5.0.15 * * @param callable $original Original ability execute callback. * @param array $input Ability input. * @param bool $is_create Whether this is a product-create ability. * @param bool $is_filter Whether this is a product-list ability that accepts a vendor filter. * @param bool $has_output Whether this ability's product output should be enriched. * * @return mixed */ private function run_product_ability(callable $original, array $input, bool $is_create, bool $is_filter, bool $has_output) { } /** * Decide the product-query scope for the current caller and `vendor_id` filter. * * Published products are public; a caller only sees unpublished products for their own store * (vendors/staff) or when they are a store admin. * * @since 5.0.15 * * @param array $input Ability input. * * @return void */ private function prepare_product_query_scope(array $input): void { } /** * Add the `vendor` property to a product ability's output schema. * * @since 5.0.15 * * @param array $args Ability registration arguments. * * @return array */ private function inject_vendor_output_schema(array $args): array { } /** * Enrich a product ability result with the owning vendor. * * @since 5.0.15 * * @param mixed $result Ability result. * * @return mixed */ private function enrich_product_result($result) { } /** * Attach the owning vendor to a single product payload. * * @since 5.0.15 * * @param mixed $product Product payload. * * @return mixed */ public function add_vendor_to_product($product) { } /** * Build the vendor payload for a product. * * @since 5.0.15 * * @param int $product_id Product ID. * * @return array */ private function vendor_payload(int $product_id): array { } /** * Resolve which vendor a created product should belong to. * * Admins/shop managers must supply a valid `vendor_id` (required over MCP; left to * WooCommerce's default otherwise to stay backward compatible). Vendors and staff are forced * to their own store. Returns `0` to apply WooCommerce's default authorship. * * @since 5.0.15 * * @param array $input Ability input. * * @return int|\WP_Error */ private function resolve_create_vendor(array $input) { } } } namespace WeDevs\Dokan\Abilities\Support { /** * Decides whether the current caller may write a vendor-owned record. * * Two facts drive this class, both measured rather than assumed: * * 1. `wc_rest_check_post_permissions()` is not a uniform authorization boundary. For a vendor * acting on another vendor's record it returns `false` for a product but `true` for an order, * because the `shop_order` capability mapping resolves differently. Relying on native * capabilities to deny cross-vendor writes therefore works for one post type and not the other. * 2. Vendor staff resolve to their parent vendor for data scope but hold their own, narrower * capabilities — and lack `edit_others_products` while acting on records authored by that * parent. Native capabilities consequently deny staff writes that Dokan's own REST API allows, * making the MCP surface *more* restrictive than the vendor dashboard. * * So ownership is asserted here rather than delegated: a write is permitted when the record * resolves to the caller's vendor scope **and** the caller holds the Dokan capability for that * action. Cross-vendor writes are denied outright instead of being left to native capabilities, * and a permitted write is granted even where a native check would refuse it. * * @since 5.0.15 */ class OwnershipGate { /** * Dokan capability required per object type and write context. * * An absent entry is a write the vendor model never grants below Store Admin — there is * deliberately no `shop_order`/`create`, because orders are created by checkout, never by * a Vendor. * * @var array> */ private const CAPABILITIES = ['product' => ['create' => 'dokan_add_product', 'edit' => 'dokan_edit_product', 'delete' => 'dokan_delete_product', 'batch' => 'dokan_edit_product'], 'shop_order' => ['edit' => 'dokan_manage_order', 'delete' => 'dokan_manage_order', 'batch' => 'dokan_manage_order']]; /** * Dokan capability required to read vendor-scoped data, mirroring the dashboard's own * gates: the orders list sits behind `dokan_view_order_menu`, a single order behind * `dokan_view_order`, and unpublished products only ever show on the product list, which * sits behind `dokan_view_product_menu`. Published products are public and never gated. * * @var array> */ private const READ_CAPABILITIES = ['product' => ['item' => 'dokan_view_product_menu', 'list' => 'dokan_view_product_menu'], 'shop_order' => ['item' => 'dokan_view_order', 'list' => 'dokan_view_order_menu']]; /** * Request contexts that mutate a record. * * @var string[] */ private const WRITE_CONTEXTS = ['create', 'edit', 'delete', 'batch']; /** * Whether a WooCommerce REST permission context mutates a record. * * @since 5.0.15 * * @param string $context Request context: read, create, edit, delete, batch. * * @return bool */ public static function is_write_context(string $context): bool { } /** * Resolve the vendor owning a record. * * @since 5.0.15 * * @param string $object_type Post type: `product` or `shop_order`. * @param int $object_id Record ID. * * @return int Vendor user ID, or 0 when it cannot be resolved. */ public static function owner_of(string $object_type, int $object_id): int { } /** * Decide a write permission for a single vendor-owned record. * * Store admins and non-vendors are passed through untouched. Collection-level checks * (`$object_id` of 0) are passed through too — list queries are scoped elsewhere, and a * batch request re-checks each contained operation individually — except creates, which * never name a record: there the Dokan capability alone decides. * * @since 5.0.15 * * @param string $object_type Post type: `product` or `shop_order`. * @param string $context Request context. * @param int $object_id Record ID, or 0 for a collection-level check. * @param bool $permission Permission decided so far. * * @return bool */ public static function can_write(string $object_type, string $context, int $object_id, bool $permission): bool { } /** * Whether the caller holds the Dokan capability for a vendor-scoped read. * * Ownership is not decided here — callers establish that the record (or list) resolves to * the caller's vendor scope first; this supplies the capability half. Reads below Store * Admin are gated like the dashboard (ADR-0007), which is behaviourally free for a default * Vendor, who holds every `dokan_*` capability, and bites only where a site has * deliberately narrowed staff capabilities. * * @since 5.0.15 * * @param string $object_type Post type: `product` or `shop_order`. * @param string $view `item` for a single record, `list` for a collection. * * @return bool */ public static function has_read_capability(string $object_type, string $view): bool { } /** * Whether the caller holds the Dokan capability for this write. * * @since 5.0.15 * * @param string $object_type Post type. * @param string $context Request context. * * @return bool */ private static function has_capability(string $object_type, string $context): bool { } } /** * Detects an **Ability Context**: any execution of a registered WordPress Ability. * * WooCommerce 10.9.0 exposes abilities to MCP clients. Dokan applies vendor scoping only inside * an Ability Context, so the heavy data-store / permission filters stay inert for normal * storefront and admin traffic. * * The primary, server-agnostic signal is "are we currently executing a registered ability" * (tracked via the `wp_before_execute_ability` / `wp_after_execute_ability` actions). That action * fires inside `WP_Ability::execute()`, so it is true no matter what invoked the ability — an MCP * server, another plugin in-process, or WP-CLI. Scoping deliberately follows the Ability rather * than the transport: an ability call that never touches an MCP URL is still scoped. * * A URI check (preferring WooCommerce's own detection when present) is kept as a secondary * signal, and the result is filterable via `dokan_is_ability_context`. * * @since 5.0.15 */ class RequestContext { /** * Nesting depth of in-progress ability executions. * * @var int */ private static int $ability_execution_depth = 0; /** * Whether the current request has been positively identified as an MCP request. * * Set as soon as the MCP adapter starts handling an ability call — before the target * ability's permission callback runs (see {@see flag_mcp_request()}). This is essential * because the adapter pre-flights an ability's permission check *outside* of any tracked * `wp_before_execute_ability` window, so the execution-depth signal is still zero then. * * @var bool */ private static bool $request_is_mcp = false; /** * Whether the shared MCP detection hooks have been registered this request. * * @var bool */ private static bool $detection_hooks_registered = false; /** * Register the shared MCP-detection hooks exactly once. * * Both the product and order ability scopers depend on these signals, so either may call this; * the guard keeps the execution counter from being incremented twice per ability. * * @since 5.0.15 * * @return void */ public static function register_detection_hooks(): void { } /** * Whether an Ability is currently executing, whatever invoked it. * * True for an MCP tool call, an in-process ability call from another plugin, or WP-CLI — * `wp_before_execute_ability` fires inside `WP_Ability::execute()` regardless of transport. * Vendor scoping follows the Ability, not the URL that reached it, so integrations must not * assume a non-MCP ability call is unscoped. * * @since 5.0.15 * * @return bool */ public static function is_ability_context(): bool { } /** * Whether a registered ability is currently executing. * * @since 5.0.15 * * @return bool */ public static function is_executing_ability(): bool { } /** * Whether a vendor is acting inside an Ability Context. * * Store admins (manage_woocommerce) are intentionally left unscoped. Vendor staff resolve to * their parent vendor via dokan_get_current_user_id(). * * @since 5.0.15 * * @return bool */ public static function is_vendor_ability_context(): bool { } /** * Flag the current request as an MCP request and return the given value unchanged. * * Designed to be hooked onto a filter the MCP adapter runs while handling a tool call — * `mcp_adapter_execute_ability_capability`, which fires inside the adapter's permission * pre-flight, *before* it checks the target ability's own permission callback. Marking the * request here lets the per-object permission grant (e.g. allowing a vendor to read their own * orders) recognize the MCP context even though no `wp_before_execute_ability` window is open * yet. Works for any MCP server built on the shared adapter (WooCommerce, a future Dokan * server, or a third-party such as MCP Site Manager). * * @since 5.0.15 * * @param mixed $value Value passed by the filter; returned unchanged. * * @return mixed */ public static function flag_mcp_request($value = null) { } /** * Mark the start of an ability execution. Hooked to `wp_before_execute_ability`. * * @since 5.0.15 * * @return void */ public static function mark_ability_execution_started(): void { } /** * Mark the end of an ability execution. Hooked to `wp_after_execute_ability`. * * @since 5.0.15 * * @return void */ public static function mark_ability_execution_finished(): void { } /** * Reset the per-request MCP state. Intended for test isolation. * * @since 5.0.15 * * @return void */ public static function reset(): void { } /** * Whether the request targets a known MCP endpoint. * * Prefers WooCommerce's own detection when present; otherwise (or when it reports false, * e.g. for a future `/dokan/mcp` endpoint) falls back to a URI check. * * @since 5.0.15 * * @param string $request_uri The current request URI. * * @return bool */ protected static function matches_mcp_endpoint(string $request_uri): bool { } /** * Whether the current request is a REST request. * * @since 5.0.15 * * @return bool */ public static function is_rest_request(): bool { } } /** * Builds the small `{ id, store_name }` vendor payload attached to ability output. * * Shared by the product and order ability scopers so a vendor is represented identically * everywhere. When a seller has no shop name set — e.g. an administrator who also owns orders / * products but never configured a store — the WordPress display name is used so the payload is * never an empty label. * * @since 5.0.15 */ class VendorPayload { /** * Build the vendor payload for a user (vendor) ID. * * @since 5.0.15 * * @param int $user_id Vendor / seller user ID. `0` for "no vendor" (e.g. a parent order). * * @return array{id:int, store_name:string} */ public static function for_user(int $user_id): array { } } } namespace WeDevs\Dokan\Abstracts { /** * Abstract Dokan_Background_Processes class */ abstract class DokanBackgroundProcesses extends \WP_Background_Process { /** * Action * * Override this action in your processor class * * @since 2.8.7 * * @var string */ protected $action = null; /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } /** * Execute after complete a task * * @since 2.8.7 * * @return void */ public function complete() { } /** * Schedule cron healthcheck * * This override method supports cron_interval * property in extended child class. * * @see https://github.com/woocommerce/woocommerce/pull/21353 * * @since 2.8.7 * * @param mixed $schedules Schedules. * * @return mixed */ public function schedule_cron_healthcheck($schedules) { } /** * Cancel background process * * Override method to clear dokan_background_processes option * * @since 2.8.7 * * @return void */ public function cancel_process() { } /** * Set process action * * @since 3.0.0 * * @return void */ protected function set_action() { } /** * Dispatch process * * Calls save and dispatch and update dokan_background_processes option * * @since 2.8.7 * * @param string $processor_file * * @return $this */ public function dispatch_process($processor_file = null) { } /** * Clean up dokan_background_processes option * * @since 2.8.7 * * @return $this */ public function clear_process() { } } } namespace WeDevs\Dokan\Traits { /** * Object Cache trait. * * Handles Caching underneath functionalities with the help of this Cacheable trait. * * @since 3.3.2 * * @package WeDevs\Dokan\Abstracts\Traits */ trait ObjectCache { /** * Add Cache Prefix to key. * * @since 3.3.2 * * @param string $key * @param string $group default: '' * * @return string processed key */ private static function get_cache_key_with_prefix($key, $group = '') { } /** * Get Cache. * * Example: * ``` * $cache_key = 'cache_key_name', * $cache_group = 'cache_group_name'; * * Cache::get( $cache_key, $cache_group ); * ``` * * @since 3.3.2 * * @param string $key * @param string $group Optional. Where the cache contents are grouped. Default empty. * @param bool $forced Optional. Whether to force an update of the local cache from the persistent cache. Default false. * * @return mixed|false */ public static function get($key, $group = '', $forced = false) { } /** * Set Cache. * * Update the cache. We've added some defaults to set the cache. * Like, We set default expiry time, cache group to remove some redundant assign of those data. * * Example: * ``` * $cache_key = 'cache_key_name', * $cache_group = 'cache_group_name'; * $cache_result = Cache::get( $cache_key, $cache_group ); * * if ( false === $cache_result ) { * $cache_result = []; // Calculate & set to to $cache_result * Cache::set( $cache_key, $cache_result, $cache_group ); * } * ``` * * @since 3.3.2 * * @param string $key * @param mixed $value * @param string $group default: ``; eg: `products`, `employees` * @param int $expire default: `WEEK_IN_SECONDS * 2`; eg: 120, DAY_IN_SECONDS * * @return bool */ public static function set($key, $value, $group = '', $expire = WEEK_IN_SECONDS * 2) { } /** * Delete Cache by key and group. * * Example: * ``` * Cache::delete( 'cache_key_name', 'cache_group_name' ); * ``` * * @since 3.3.2 * * @param string $key The key under which to store the value. * @param string $group The group value appended to the $key. * @param int $time The amount of time the server will wait to delete the item in seconds. * * @return bool */ public static function delete($key, $group = '', $time = 0) { } /** * Invalidate cache group at once by group name. * * Example: * ``` * Cache::invalidate_group( 'group_name' ); * ``` * * @since 3.3.2 * @since 5.0.16 Removed the redundant `wp_cache_flush_group()` call. It targeted a group * no key is ever written to, while forcing persistent backends such as * Redis into a full keyspace scan on every call. * * @param string $group Group of caches to clear. * * @return bool */ public static function invalidate_group($group) { } /** * Get Cache Key and Group with Prefix added. * * @since 3.3.2 * * @param string $key * @param string $group * * @return array */ private static function get_key_and_group($key, $group) { } } /** * Transient trait. * * Handles Transient underneath functionalities with the help of this TransientTrait trait. * * @since 3.3.2 * * @package WeDevs\Dokan\Abstracts\Traits */ trait TransientCache { /** * Get transient version. * * When using transients with unpredictable names, e.g. those containing an md5 * hash in the name, we need a way to invalidate them all at once. * * With external cache however, this isn't possible. Instead, this function is used * to append a unique string (based on time()) to each transient. When transients * are invalidated, the transient version will increment and data will be regenerated * * @since 3.3.2 * * @param string $group Name for the group of transients we need to invalidate. * @param bool $refresh true to force a new version. * * @return string transient version based on microtime(). */ private static function get_transient_version($group, $refresh = false) { } /** * Add Cache Prefix to key. * * @since 3.3.2 * * @param string $key * @param string $group; default: '' * * @return string processed key */ private static function get_formatted_transient_key($key, $group = '') { } /** * Get Transient value from a key. * * It applies for oth from Object & Normal data * If needs only key value, just pass `$transient_key` * If the transient value is an object, and need to get the params of that object * then pass the second args `$param`. * * Examples: * * Get transient value for a normal key. * ``` * Cache::get_transient( 'transient_key' ); // returns only `transient_key`'s value * ``` * * Get transient value for a group. * ``` * Cache::get_transient( 'transient_key', 'group_name' ); * ``` * * @since 3.3.2 * * @param string $key eg: seller_data_[id] * @param string $group eg: null, seller_earnings * * @return mixed|false Transient value or false */ public static function get_transient($key, $group = '') { } /** * Set Transient value for a key. * * @since 3.3.2 * * @param string $key eg: seller_data_[id] * @param string $value eg: 6000, ['earning' => 1] * @param string $group eg: seller_earnings * @param int $expiration default: 1 Week => WEEK_IN_SECONDS * * @return bool True if the value was set, false otherwise */ public static function set_transient($key, $value, $group = '', $expiration = WEEK_IN_SECONDS) { } /** * Delete transient. * * @since 3.3.2 * * @param string $key eg: seller_data_[id] * @param string $group eg: seller_earnings * * @return bool True if the transient was deleted otherwise false. */ public static function delete_transient($key, $group = '') { } /** * Invalidate transient group at once by group name. * * Example: * ``` * Cache::invalidate_transient_group( 'group_name' ); * ``` * * @since 3.3.2 * * @param string $group Group of transients data to clear. * * @return string */ public static function invalidate_transient_group($group) { } } } namespace WeDevs\Dokan\Abstracts { /** * Dokan Cache class. * * Manage all of the caches of your WordPress plugin and handles it beautifully. * * @since 3.3.2 * * @package WeDevs\Dokan\Abstracts\Cache */ abstract class DokanCache { use \WeDevs\Dokan\Traits\ObjectCache, \WeDevs\Dokan\Traits\TransientCache; /** * Get Cache Group Prefix. * * @since 3.3.2 * * @return string */ abstract protected static function get_cache_group_prefix(); /** * Get Cache Key Prefix. * * @since 3.3.2 * * @return string */ abstract protected static function get_cache_prefix(); /** * Add Cache Group Prefix to group. * * @since 3.3.2 * * @param string $group * * @return string */ private static function get_cache_group_with_prefix($group) { } /** * Get Microtime value as prefix. * * This will Replace microtime() value's dot => '.' and space => ' ' * characters with underscore => '_' character * * @since 3.3.2 * * @return string */ private static function get_time_prefix() { } } abstract class DokanModel { /** * Set model data * * @since 3.0.0 * * @param array $data */ abstract protected function set_data($data); /** * Get model data * * @since 3.0.0 * * @return array */ public function get_data() { } /** * Save model data * * @since 3.0.0 * * @return \WeDevs\Dokan\Abstracts\Model */ abstract public function save(); /** * Create a model * * @since 3.0.0 * * @return \WeDevs\Dokan\Abstracts\Model */ abstract protected function create(); /** * Update a model * * @since 3.0.0 * * @return \WeDevs\Dokan\Abstracts\Model */ abstract protected function update(); /** * Delete a model * * @since 3.0.0 * * @return \WeDevs\Dokan\Abstracts\Model */ abstract public function delete(); } /** * Promotion class * * For displaying AI base promotion in admin panel * * @since 2.9.0 * * @package dokan */ abstract class DokanPromotion { /** * Time Interval displaying between two promo * * @var integer */ public $time_interval = 60 * 60 * 24 * 7; /** * option key for promo * * @var string */ public $promo_option_key = '_dokan_displayed_promos'; /** * Load autometically when class initiate * * @since 2.9.0 */ public function __construct() { } /** * Get data * * @since 1.0.0 * * @return array */ abstract public function get_promotion_data(); /** * Module promotion notices * * @since 2.9.0 * * @return void */ public function show_promotions() { } /** * Dissmiss prmo notice according * * @since 1.0.0 * * @return void */ public function dismiss_upgrade_promo() { } /** * Get latest prmo * * @since 1.0.0 * * @return array */ public function get_latest_promo() { } /** * Sort all promotions depends on priority key * * @param array $a * @param array $b * * @return integer */ public function sort_by_priority($a, $b) { } } } namespace WeDevs\Dokan\REST { /** * Base REST Controller for Dokan * * @since 3.14.11 * * @package dokan */ abstract class DokanBaseController extends \WP_REST_Controller { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Format item's collection for response * * @since 3.14.11 * * @param object $response * @param object $request * @param array $items * @param int $total_items * * @return object */ public function format_collection_response($response, $request, $total_items) { } } /** * Admin REST Controller for Dokan * * @since 3.14.11 * @package dokan */ abstract class DokanBaseAdminController extends \WeDevs\Dokan\REST\DokanBaseController { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1/admin'; /** * Check if user has admin permission. * * @since 2.8.0 * * @return bool */ public function check_permission() { } } } namespace WeDevs\Dokan\Abstracts { /** * Admin Dashboard * * @since 2.8.0 * @deprecated 3.14.11 Use \WeDevs\Dokan\REST\DokanBaseAdminController instead. * * @package dokan */ abstract class DokanRESTAdminController extends \WeDevs\Dokan\REST\DokanBaseAdminController { } /** * Base REST Controller for dokan * * @since 2.8.0 * * @package dokan */ abstract class DokanRESTController extends \WP_REST_Controller { /** * Author id pinned by the route, overriding any caller supplied scope. * * `0` means no pinning, so the regular author gate in * `prepare_objects_query()` applies. * * @since 5.0.13 * * @var int */ protected $forced_author = 0; /** * Pin the listing to a single vendor, regardless of request params. * * Routes served with a public `permission_callback` cannot rely on the * capability based author gate in `prepare_objects_query()`, because an * anonymous caller resolves to author `0` and `WP_Query` silently drops the * clause. Such routes must decide the scope themselves instead of widening * the shared gate for every caller. * * @since 5.0.13 * * @param int $author_id Vendor id to scope the listing to. * * @return void */ public function set_forced_author(int $author_id) { } /** * Get object. * * @param int $id Object ID. * @return object WC_Data object or WP_Error object. */ protected function get_object($id) { } /** * Get a collection of posts. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_items($request) { } /** * Get Item for an object * * @since 2.8.0 * * @return object */ public function get_item($request) { } /** * Create Item * * @since 2.8.0 * * @return WP_Error|WP_REST_Response */ public function create_item($request) { } /** * Update an Item * * @since 2.8.0 * * @return WP_Error|WP_REST_Response */ public function update_item($request) { } /** * Delete an item * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function delete_item($request) { } /** * Prepare_object_for_database * * @since 2.8.0 * * @return void */ protected function prepare_object_for_database($request) { } /** * Prepares a response for insertion into a collection. * * @since 4.7.0 * * @param WP_REST_Response $response Response object. * @return array|mixed Response data, ready for insertion into collection data. */ public function prepare_response_for_collection($response) { } /** * Validate before create an Item * * @since 2.8.0 * * @return bool|WP_Error */ protected function validation_before_create_item($request) { } /** * Validate before update an Item * * @since 2.8.0 * * @return bool|WP_Error */ protected function validation_before_update_item($request) { } /** * Validate before delete an Item * * @since 2.8.0 * * @return bool|WP_Error */ protected function validation_before_delete_item($request) { } /** * Prepares the object for the REST response. * * @since 2.8.0 * @param Dokan_Data $object Object data. * @param WP_REST_Request $request Request object. * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure. */ protected function prepare_data_for_response($object, $request) { } /** * Prepare objects query. * * @since 2.8.0 * @param WP_REST_Request $request Full details about the request. * @return array */ protected function prepare_objects_query($request) { } /** * Determine the allowed query_vars for a get_items() response and * prepare for WP_Query. * * @param array $prepared_args * @param WP_REST_Request $request * @return array $query_args */ protected function prepare_items_query($prepared_args = array(), $request = null) { } /** * Get all the WP Query vars that are allowed for the API request. * * @return array */ protected function get_allowed_query_vars() { } /** * Format item's collection for response * * @param WP_REST_Response $response * @param WP_REST_Request $request * @param int $total_items * * @return WP_REST_Response */ public function format_collection_response($response, $request, $total_items) { } /** * Update post author if requested. * * @since 3.10.3 * * @param WP_REST_Request $request Request object. * @param int $object_id Object ID. * * @return void */ public function update_post_author_if_needed(\WP_REST_Request $request, int $object_id) { } /** * Add meta query. * * @since 3.0.2 * * @param array $args Query args. * @param array $meta_query Meta query. * * @return array */ protected function add_meta_query($args, $meta_query) { } } abstract class DokanShortcode { protected $shortcode = ''; public function __construct() { } public function get_shortcode() { } abstract public function render_shortcode($atts); } abstract class DokanUpgrader { /** * Execute upgrader class methods * * This method will execute every method found in child * upgrader class dynamically. Keep in mind that methods * should be public static function. * * @since 3.0.0 * * @param string $required_lite_version Required in case of Pro upgraders * * @return void */ public static function run($required_lite_version = null) { } /** * Update the DB version * * Upgrader files should follow naming convention * as V_XX_XX_XX.php where Xs are number following * semvar convention. For example if you have a upgrader * for version 1.23.40, the the filename should be * V_1_23_40.php. * * @since 3.0.0 * * @return void */ public static function update_db_version() { } /** * Get db versioning key * * This method should be overriden in Dokan Pro * * @since 3.0.0 * * @return string */ public static function get_db_version_key() { } } /** * Product status changer abstract class * * @since 3.7.18 */ abstract class ProductStatusChanger { /** * Vendor id * * @since 3.7.18 * * @var int $vendor_id */ private $vendor_id; /** * Current page * * @since 3.7.18 * * @var int $page */ private $page = 1; /** * Number of products to process per batch * * @string 3.7.18 * * @var int $per_page */ private $per_page = 100; /** * Task type * * @string 3.7.18 * * @var string $task_type change_status|revert */ private $task_type; /** * Class constructor * * @since 3.7.18 * * @return void */ public function __construct() { } /** * Set vendor id * * @since 3.7.18 * * @param int $vendor_id * * @return void */ public function set_vendor_id($vendor_id) { } /** * Set task type * * @since 3.7.18 * * @param string $task_type change_status|revert * * @return void */ public function set_task_type($task_type) { } /** * Set current page * * @since 3.7.18 * * @param int $page * * @return void */ public function set_page($page) { } /** * Set number of products to process per batch * * @since 3.7.18 * * @param int $per_page * * @return void */ public function set_per_page($per_page) { } /** * Get vendor id * * @since 3.7.18 * * @return int */ public function get_vendor_id() { } /** * Get task type * * @since 3.7.18 * * @return string */ public function get_task_type() { } /** * Get current page * * @since 3.7.18 * * @return int */ public function get_current_page() { } /** * Increment current page * * @since 3.7.18 * * @return void */ protected function increment_current_page() { } /** * Get number of products to process per batch * * @since 3.7.18 * * @return int */ public function get_per_page() { } /** * Reset properties * * @since 3.7.18 * * @return void */ public function reset() { } /** * Get products to process * * @since 3.7.18 * * @return int[] */ abstract public function get_products(); /** * Add products to queue * * @since 3.7.18 * * @param string $task_type change_status|revert * @param string|null $status * * @return void */ public function add_to_queue($task_type = 'change_status', $status = null) { } /** * Process background task * * @since 3.7.18 * * @param array $args * * @return void */ public function process_background_task($args) { } /** * Clear product cache * * @since 3.7.18 * * @param string[] $args * * @return void */ public function clear_product_cache($args) { } /** * Change product status * * @since 3.7.18 * * @param int $product_id * @param string|null $status * * @return void */ private function change_status($product_id, $status) { } /** * Revert product status * * @since 3.7.18 * * @param int $product_id * * @return void */ private function revert($product_id) { } } /** * Settings Element Class. */ abstract class SettingsElement { /** * ID of the settings element. * * @var string $id ID. */ protected $id = ''; /** * Title of the settings element. * * @var string $title Title. */ protected $title = ''; /** * Description of the settings element. * * @var string $description Description. */ protected $description = ''; /** * The Icon class for the settings element. * * @var string $icon Icon. */ protected $icon = ''; /** * Settings Element Value. * * @var mixed $value Value. */ protected $value; /** * Is the element support children? * * @var bool $support_children Has children. */ protected $support_children = true; /** * Children Settings elements. * * @var SettingsElement[] $children Children Elements. */ protected $children = array(); /** * The settings dependencies. * * @var array $dependencies Dependencies. */ protected $dependencies = array(); /** * Settings Type. * * @var string $type Settings Type. */ protected $type = ''; /** * The key for generating dynamic hook. * * @var string $hook_key Hook Key. */ public $hook_key = ''; /** * The key for generating dynamic Dependency. * * @var string $dependency_key Dependency Key. */ public $dependency_key = ''; /** * The constructor. * * @param string $id ID of the settings. */ public function __construct(string $id) { } /** * Get the ID of the Settings element. * * @return string */ public function get_id(): string { } /** * Set the ID of the Settings element. * * @param string $id ID. * * @return SettingsElement */ public function set_id(string $id): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get the Type of the Settings element. * * @return string */ public function get_type(): string { } /** * Get the Title of the Settings element. * * @return string */ public function get_title(): string { } /** * Set the Title of the Settings element. * * @param string $title Title. * * @return SettingsElement */ public function set_title(string $title): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get the Description of the Settings element. * * @return string */ public function get_description(): string { } /** * Set the Description of the Settings element. * * @param string $description The description. * * @return SettingsElement */ public function set_description(string $description): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get the icon of the Settings element. * * @return string */ public function get_icon(): string { } /** * Set the icon of the Settings element. * * @param string $icon Icon class. * * @return SettingsElement */ public function set_icon(string $icon): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get Hook Key. * * @return string */ public function get_hook_key(): string { } /** * Set Hook key. * * @param string $hook_key Key. * * @return SettingsElement */ public function set_hook_key(string $hook_key): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get Dependencies key. * * @return string */ public function get_dependency_key(): string { } /** * Set Dependencies key. * * @param string $dependency_key The dependency_key. * * @return SettingsElement */ public function set_dependency_key(string $dependency_key): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get the Value for the element. * * @return mixed */ public function get_value() { } /** * Set The element value. * * @param mixed $value The element value. * * @return SettingsElement */ public function set_value($value): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Check is the settings element support children. * * @return bool */ public function is_support_children(): bool { } /** * Get the children of the settings elements. * * @return SettingsElement[] */ public function get_children(): array { } /** * Set Children. * * @param array $children Children. * * @return SettingsElement * @throws Exception If children are not attachable. */ public function set_children(array $children): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get element dependency array. * * @return array */ public function get_dependencies(): array { } /** * Set Dependencies. * * @param array $dependencies Dependencies. * * @return SettingsElement */ public function set_dependencies(array $dependencies): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Add Dependencies to the SettingsElement. * * @param string $key Dot (.) seperated key string. * @param mixed $value Value for comparison. * @param bool $to_self Value for comparison. * @param string $attribute Attributes for operation (Optional). * @param string $effect The effect of dependency (Optional). * @param string $comparison Value comparison operator (Optional). * * @return SettingsElement */ public function add_dependency(string $key, $value, bool $to_self = true, string $attribute = 'display', string $effect = 'hide', string $comparison = '='): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Add child element. * * @param SettingsElement $element Settings element. * * @return $this * @throws Exception If child element is not attachable. */ public function add(\WeDevs\Dokan\Abstracts\SettingsElement $element): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Detach any child element. * * @param SettingsElement $element Child Element. * * @return SettingsElement * @throws Exception If Element is not removable. */ public function remove(\WeDevs\Dokan\Abstracts\SettingsElement $element): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Validate the Data. * * @param mixed $data Data to store. * * @return bool */ public function validate($data): bool { } /** * Populate The settings array. * * @return array */ public function populate(): array { } /** * Sanitize the settings element. * * @param mixed $data Data for sanitization. * * @return array|string */ public function sanitize($data) { } /** * Data Validation condition. * * @param mixed $data Data for validation. * * @return bool */ abstract public function data_validation($data): bool; /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return mixed */ abstract public function sanitize_element($data); /** * Escape Output for usage. * * @param mixed $data Data for sanitization. * * @return mixed */ abstract public function escape_element($data); } /** * Settings Class. */ abstract class Settings extends \WeDevs\Dokan\Abstracts\SettingsElement { const STORAGE_TYPE_OPTIONS = 'options'; const STORAGE_TYPE_USER_META = 'user_meta'; /** * Current Setting value storage type. * * @var string $storage_type Storage Type. */ protected $storage_type = self::STORAGE_TYPE_OPTIONS; /** * Storage Kay. * * @var string $storage_key Storage Key. */ protected $storage_key = 'dokan_settings_'; /** * Settings constructor. */ public function __construct() { } /** * Populate settings. * * @return array */ public function populate(): array { } /** * Get the stored data for these settings. * * @return Settings */ public function hydrate_data(): \WeDevs\Dokan\Abstracts\Settings { } /** * Get data from preferred storage. * * @return mixed */ protected function get_data() { } /** * Get option. * * @param string $key settings key (.) dot separated. * @param mixed $default_value Default value. * * @return mixed */ public static function get_option(string $key, $default_value = null) { } /** * Save data for these settings. * * @param mixed $data Data to be stored. * * @return bool * @throws Exception If data could not be stored. */ public function save($data): bool { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return array|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } /** * Describe the settings options. * * It is used to describe the settings options for the settings page in `init` hook. * * @since 4.0.0 * * @return void */ public function get_described_settings() { } /** * Describe the settings options * * @return void */ abstract public function describe_settings(): void; } abstract class StatusElement { protected bool $support_children = false; protected string $id = ''; protected string $title = ''; protected string $description = ''; protected string $icon = ''; protected string $type = ''; protected string $data = ''; protected string $hook_key = ''; protected array $children = []; /** * StatusElement constructor. * * @param string $id */ public function __construct(string $id) { } /** * @return bool */ public function is_support_children(): bool { } /** * @param bool $support_children * * @return StatusElement */ public function set_support_children(bool $support_children): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_id(): string { } /** * @param string $id * * @return StatusElement */ public function set_id(string $id): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_hook_key(): string { } /** * @param string $hook_key * * @return StatusElement */ public function set_hook_key(string $hook_key): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_title(): string { } /** * @param string $title * * @return StatusElement */ public function set_title(string $title): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_description(): string { } /** * @param string $description * * @return StatusElement */ public function set_description(string $description): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_icon(): string { } /** * @param string $icon * * @return StatusElement */ public function set_icon(string $icon): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return array */ public function get_children(): array { } /** * Set children. * * @since 4.0.0 * * @param array $children * * @return StatusElement * @throws Exception */ public function set_children(array $children): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_type(): string { } /** * @param string $type * * @return StatusElement */ public function set_type(string $type): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return string */ public function get_data(): string { } /** * @param string $data * * @return StatusElement */ public function set_data(string $data): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @throws Exception */ public function add(\WeDevs\Dokan\Abstracts\StatusElement $child): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @throws Exception */ public function remove(\WeDevs\Dokan\Abstracts\StatusElement $element): \WeDevs\Dokan\Abstracts\StatusElement { } /** * @return array */ public function render(): array { } /** * @param string $data * * @return string */ abstract public function escape_data(string $data): string; } } namespace WeDevs\Dokan\Admin { /** * WordPress settings API For Dokan Admin Settings class * * @author Tareq Hasan */ class AdminBar { /** * Class constructor * * Sets up all the appropriate hooks and actions * within our plugin. * * @return void */ public function __construct() { } /** * Add Menu in Dashboard Top bar * * @return void */ public function dokan_admin_toolbar() { } /** * Show visit vendor dashboard * * @param WP_Admin_Bar $wp_admin_bar * * @return void */ public function visit_dashboard_menu($wp_admin_bar) { } /** * Get admin menus data for dokan. * * @since 3.2.15 * * @return array */ public function get_dokan_admin_bar_menus() { } } } namespace WeDevs\Dokan\Admin\Dashboard { /** * Admin dashboard class. * * @since 4.0.0 */ class Dashboard implements \WeDevs\Dokan\Contracts\Hookable { /** * @var array< Pageable > */ protected array $pages = []; /** * @var string */ protected string $script_key = 'dokan-admin-dashboard'; /** * @var string */ protected string $setup_guide_key = 'dokan-setup-guide-banner'; /** * Admin switching script key. * * @SINCE 4.1.3 * * @var string */ protected string $switching_script_key = 'dokan-admin-switching'; /** * Admin panel header script key. * * @since 4.1.3 * * @var string */ protected string $header_script_key = 'dokan-admin-panel-header'; /** * Register hooks. */ public function register_hooks(): void { } /** * Get all pages. * * @since 4.0.0 * * @return array< Pageable > * * @throws \InvalidArgumentException If the page is not an instance of Pageable. */ public function get_pages(): array { } /** * Register the submenu menu. * * @since 4.0.0 * * @param string $capability Menu capability. * @param string $position Menu position. * * @return void */ public function register_menu(string $capability, string $position) { } /** * Render the dashboard page. * * @since 4.0.0 * * @return void */ public function render_dashboard_page(): void { } /** * Get all settings. * * @since 4.0.0 * * @return array */ public function settings(): array { } /** * Get all scripts ids. * * @since 4.0.0 * * @return array */ public function scripts(): array { } /** * Get all styles ids. * * @since 4.0.0 * * @return array */ public function styles(): array { } /** * Register dashboard scripts. * * @since 4.0.0 * * @return void */ public function register_scripts() { } /** * Register the admin dashboard scripts. * * @since 4.0.0 * * @return void */ protected function register_admin_dashboard_scripts() { } /** * Register the admin panel header scripts. * * @since 4.1.3 * * @return void */ protected function register_admin_panel_header_scripts() { } /** * Register the setup guide banner scripts. * * @since 4.0.0 * * @return void */ protected function register_setup_guide_scripts() { } /** * Register the admin switching scripts. * * @since 4.1.3 * * @return void */ protected function register_admin_switching_scripts() { } /** * Enqueue dashboard scripts. * * @since 4.0.0 * * @return void */ public function enqueue_scripts() { } /** * Check whether the current admin request targets one of the given Dokan pages. * * Matches the locale-stable `page` slug rather than the screen id, whose prefix * is derived from the translatable menu title and breaks on non-Latin locales. * * @since 5.0.6 * * @param array $page_slugs Admin page slugs to match against. * * @return bool */ protected function is_dokan_admin_page(array $page_slugs): bool { } /** * Runs before admin notices action and hides them. * * @since 4.1.0 * * @return void */ public function inject_before_notices(): void { } /** * Runs after admin notices and closes div. * * @since 4.1.0 * * @return void */ public function inject_after_notices(): void { } /** * Add container for admin switching functionality. * * @since 4.1.3 * * @param string $text Footer text * * @return string Modified footer text with admin switching container */ public function add_switching_container($text) { } /** * Add empty update footer for Dokan screens. * * @since 4.1.3 * * @param string $content Footer content * * @return string Empty string for Dokan screens, original content otherwise */ public function add_update_footer($content) { } } /** * LegacySwitcher Class * * Handles legacy URL switching and menu title clearing for admin dashboard and settings. * * @since 4.1.3 */ class LegacySwitcher implements \WeDevs\Dokan\Contracts\Hookable { /** * Value of `dokan_action` that triggers the product editor switch. * * @since 5.0.0 */ public const PRODUCT_EDITOR_SWITCH_ACTION = 'switch_product_editor'; /** * Default transient expiration time in seconds (15 days) * * @since 4.1.3 * * @var int */ protected int $transient_expiration = 15 * DAY_IN_SECONDS; /** * Register hooks for the LegacySwitcher * * @since 4.1.3 * * @return void */ public function register_hooks(): void { } /** * Clear admin submenu title based on legacy dashboard preference. * * @since 4.1.3 * * @return void */ public function handle_dokan_admin_submenu(): void { } /** * Handle dashboard redirect based on legacy dashboard preference. * * @since 4.1.3 * * @return void */ public function handle_dashboard_redirect(): void { } /** * Get admin menu transient key. * * @since 4.1.3 * * @param string $key * * @return string */ public function get_custom_transient_key($key) { } /** * Whether the given user prefers the legacy product editor. * * Defaults to `false` — the new (React) product editor. * * @since 5.0.0 * * @param int $user_id Optional. Defaults to current user. * * @return bool */ public function is_product_editor_legacy_preferred(int $user_id = 0): bool { } /** * Build the new (React) product editor URL. * * @since 5.0.0 * * @param int $product_id * * @return string */ public function get_new_product_editor_url(int $product_id): string { } /** * Build the legacy product editor URL, falling back to the * create-new-product URL when no product id is supplied. * * @since 5.0.0 * * @param int $product_id * * @return string */ protected function get_legacy_product_editor_url(int $product_id): string { } } /** * Interface Pageable. * * @package WeDevs\Dokan\Admin\Dashboard * * @since 4.0.0 */ interface Pageable { /** * Get the ID of the page. * * @since 4.0.0 * * @return string */ public function get_id(): string; /** * Get the menu arguments. * * @since 4.0.0 * * @param string $capability Menu capability. * @param string $position Menu position. * * @return array An array of associative arrays with keys 'route', 'page_title', 'menu_title', 'capability', 'position'. */ public function menu(string $capability, string $position): array; /** * Get the settings values. * * @since 4.0.0 * * @return array An array of settings values. */ public function settings(): array; /** * Get the scripts. * * @since 4.0.0 * * @return array An array of script handles. */ public function scripts(): array; /** * Get the styles. * * @since 4.0.0 * * @return array An array of style handles. */ public function styles(): array; /** * Register the page scripts and styles. * * @since 4.0.0 * * @return void */ public function register(): void; } } namespace WeDevs\Dokan\Admin\Dashboard\Pages { abstract class AbstractPage implements \WeDevs\Dokan\Admin\Dashboard\Pageable, \WeDevs\Dokan\Contracts\Hookable { /** * Register the hooks. * * @since 4.0.0 * * @return void */ public function register_hooks(): void { } public function enlist($pages) { } /** * @inheritDoc */ abstract public function get_id(): string; /** * @inheritDoc */ abstract public function menu(string $capability, string $position): array; /** * @inheritDoc */ abstract public function settings(): array; /** * @inheritDoc */ abstract public function scripts(): array; /** * @inheritDoc */ abstract public function styles(): array; /** * @inheritDoc */ abstract public function register(): void; } class Extensions extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 5.0.0 * * @return string */ public function get_id(): string { } /** * Get the title of the page. * * @since 5.0.0 * * @param string $title Default title. * @param string $page_title Page title. * * @return array */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * Get extension data for the frontend. * * @since 5.0.0 * * @return array */ protected function get_extensions_data(): array { } /** * Get weLabs data for services. * * @since 5.0.0 * * @param string $thumbnail_dir Base URL for thumbnails. * * @return array */ protected function get_welabs_data(string $thumbnail_dir): array { } /** * Get recommended addons list. * * @since 5.0.0 * * @param string $thumbnail_dir Base URL for thumbnails. * * @return array */ protected function get_recommended_addons(string $thumbnail_dir): array { } /** * Check if a premium addon module is available. * * A premium addon is considered "installed" when: * - The standalone plugin for that addon is installed, OR * - Dokan Pro is installed and the module is available in the current plan. * * @since 5.0.0 * * @param string $module_key The module key (e.g. 'booking', 'simple-auction'). * @param array $installed_plugins List of installed plugins. * * @return bool */ protected function is_premium_addon_installed(string $module_key, array $installed_plugins): bool { } /** * Get mobile apps data. * * @since 5.0.0 * * @param string $thumbnail_dir Base URL for thumbnails. * * @return array */ protected function get_mobile_apps(string $thumbnail_dir): array { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function register(): void { } } class Modules extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 4.0.0 * * @return string */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * Get the styles. * * @since 4.0.0 * * @return array An array of style handles. */ public function styles(): array { } /** * Register the page scripts and styles. * * @since 4.0.0 * * @return void */ public function register(): void { } } class ProFeatures extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 4.1.0 * * @return string */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * Get the styles. * * @since 4.1.0 * * @return array An array of style handles. */ public function styles(): array { } /** * Register the page scripts and styles. * * @since 4.1.0 * * @return void */ public function register(): void { } } class ReverseWithdrawal extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 4.2.0 * * @return string */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * Get the styles. * * @since 4.2.0 * * @return array An array of style handles. */ public function styles(): array { } /** * Register the page scripts and styles. * * @since 4.2.0 * * @return void */ public function register(): void { } } class SetupGuide extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * @var AdminSetupGuide $admin_setup_guide Admin setup guide instance. */ protected \WeDevs\Dokan\Admin\OnboardingSetup\AdminSetupGuide $admin_setup_guide; /** * SetupGuide constructor. * * @param AdminSetupGuide $admin_setup_guide Admin setup guide instance. */ public function __construct(\WeDevs\Dokan\Admin\OnboardingSetup\AdminSetupGuide $admin_setup_guide) { } /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function register(): void { } } class Status extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 4.0.0 * * @return string */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * Get the styles. * * @since 4.0.0 * * @return array An array of style handles. */ public function styles(): array { } /** * Register the page scripts and styles. * * @since 4.0.0 * * @return void */ public function register(): void { } } /** * Admin Tools page (React dashboard). * * Renders the free Tools sections; Dokan Pro injects its own sections into the * same page via the `dokan_admin_dashboard_tools_sections` JS filter. * * @since 5.0.9 */ class Tools extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function register(): void { } } class Vendors extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { public function get_id(): string { } public function menu(string $capability, string $position): array { } public function settings(): array { } public function scripts(): array { } public function styles(): array { } public function register(): void { } } class Withdraw extends \WeDevs\Dokan\Admin\Dashboard\Pages\AbstractPage { /** * Get the ID of the page. * * @since 4.0.0 * * @return string */ public function get_id(): string { } /** * @inheritDoc */ public function menu(string $capability, string $position): array { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function scripts(): array { } /** * Get the styles. * * @since 4.0.0 * * @return array An array of style handles. */ public function styles(): array { } /** * Register the page scripts and styles. * * @since 4.0.0 * * @return void */ public function register(): void { } } } namespace WeDevs\Dokan\Admin { /** * Admin Hooks * * @since 3.0.0 * * @package dokan */ class Hooks { /** * Load autometically when class initiate * * @since 3.0.0 */ public function __construct() { } /** * Send notification to the seller once a product is published from pending * * @param WP_Post $post * * @return void */ public function send_notification_on_product_publish($post) { } /** * Remove default author metabox and added new one for dokan seller * * @since 1.0.0 * * @return void */ public function add_seller_meta_box() { } /** * Display form field with list of authors. * * @since 2.5.3 * * @param object $post */ public static function seller_meta_box_content($post) { } /** * Ajax method to search vendors * * @since 3.7.1 * * @return void */ public function search_vendors() { } /** * Override product vendor ID from admin panel * * @since 2.6.2 * * @return void */ public function override_product_author_by_admin($product_id) { } /** * Assign vendor for deleted post types * * @param array $post_types * @param integer $user_id * * @return array */ public function add_wc_post_types_to_delete_user($post_types, $user_id) { } /** * Dokan update pages * * @param array $value * @param array $name * * @return array */ public function update_pages($value, $name) { } /** * Add commission settings in bulk product edit. * * @since 3.14.2 * * @return void */ public function add_product_commission_bulk_edit_field() { } /** * Save commission settings from bulk product edit * * @since 3.14.2 * * @param \WC_Product $product * * @return void */ public function save_custom_bulk_edit_field($product) { } } class Menu { /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } /** * Add Dokan admin menu * * @since 1.0.0 * @since 3.0.0 Moved to Menu class * * @return void */ public function add_admin_menu() { } /** * Append a dashboard Page service's submenu entry under the Dokan top-level menu. * * Used for pages that opt out of {@see \WeDevs\Dokan\Admin\Dashboard\Dashboard::register_menu()} * via 'hidden' => true so their position relative to the static Help/Settings entries * can be controlled here. * * @since 5.0.0 * * @param string $page_class Fully-qualified Pageable service class name. * @param string $parent_slug Parent menu slug (the Dokan top-level menu). * @param string $capability Capability required to view the menu. * @param string $menu_position Dokan top-level menu position. * * @return void */ protected function append_dashboard_page_submenu(string $page_class, string $parent_slug, string $capability, string $menu_position): void { } /** * Dashboard scripts and styles * * @since 1.0 * @since 3.0.0 Moved to Menu class * * @return void */ public function dashboard_script() { } /** * Load Dashboard Template * * @since 1.0 * @since 3.0.0 Moved to Menu class * * @return void */ public function dashboard() { } } } namespace WeDevs\Dokan\Admin\Notices { /** * Dokan Admin notices helper methods * * @sience 3.3.3 */ class Helper { /** * This method will display notices only under Dokan menu and all of its sub-menu pages * * @since 3.3.3 * * @return array | void */ public static function dokan_get_admin_notices() { } /** * Dokan promotional notices * * @since 3.3.3 * * @return array */ public static function dokan_get_promo_notices() { } /** * Check if dokan pro-license is active * * @since 3.9.3 * * @return bool */ public static function is_pro_license_active(): bool { } /** * Check has new version in dokan lite and pro * * @since 3.3.3 * * @return bool */ public static function dokan_has_new_version() { } /** * Sort all notices depends on priority key * * @param array $current_notice * @param array $next_notice * * @since 3.3.3 * * @return integer */ private static function dokan_sort_notices_by_priority($current_notice, $next_notice) { } } /** * Limited time promotion class * * For displaying limited time promotion in admin panel * * @since 3.0.14 * * @package dokan */ class LimitedTimePromotion { /** * Option key for limited time promo * * @var string */ public $promo_option_key = '_dokan_limited_time_promo'; /** * LimitedTimePromotion constructor */ public function __construct() { } /** * Render promotional notices via vue.js * * @return void */ public function render_promo_notices_html() { } /** * Dismisses limited time promo notice */ public function dismiss_limited_time_promo() { } } } namespace WeDevs\Dokan\Traits { trait ChainableContainer { /** * Contains chainable class instances * * @var array */ protected $container = []; /** * Cloning is forbidden. * * @since 3.7.21 */ public function __clone() { } /** * Unserializing instances of this class is forbidden. * * @since 3.7.21 */ public function __wakeup() { } /** * Magic getter to get chainable container instance * * @since 3.0.0 * * @param string $prop * * @return mixed */ public function __get($prop) { } } } namespace WeDevs\Dokan\Admin\Notices { /** * Dokan Admin notices handler class * * @since 3.3.3 */ class Manager { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.3.3 */ public function __construct() { } /** * Register all notices classes to chainable container * * @since 3.3.3 * * @return void */ private function init_classes() { } /** * Handle notices that has no ajax action * * @since 3.3.3 * * @return void */ private function init_hooks() { } /** * Load admin notices style and styles * * @since 3.3.6 * * @return void */ public function load_dokan_admin_notices_styles() { } /** * Render dokan global admin notices via Vue.js * * @since 3.3.3 * * @return void */ public function render_global_admin_notices_html() { } /** * Missing WooCommerce notice * * @since 2.9.16 * * @return void */ public function render_missing_woocommerce_notice() { } /** * Display permalink format not working for Dokan notice * * @since 3.3.3 * * @param array $notices * * @return array */ public function show_permalink_setting_notice($notices) { } /** * Display dokan admin logo update notice. * * @since 3.14.0 * * @param array $notices * * @return array */ public function show_admin_logo_update_notice(array $notices): array { } /** * Dismisses dokan admin logo update notice. * * @since 3.14.0 * * @return void */ public function dismiss_dokan_admin_logo_update_notice() { } /** * Dismisses dokan notice. * * @since 3.14.0 * * @param string $option_name The name of the option to update. * * @return void */ private function dismiss_notice(string $option_name) { } /** * Show admin notice if dokan lite is updated to v3.14.0 and dokan pro is not updated to minimum v3.14.0. * * @since 3.14.0 * * @param $notices * * @return mixed */ public function show_admin_plugin_update_notice($notices) { } /** * Show admin notice if vendor onboarding page is not configured. * * @since 5.0.0 * * @param array $notices * * @return array */ public function show_vendor_onboarding_page_notice($notices) { } /** * Check if vendor onboarding page is configured. * * @since 5.0.0 * * @return bool */ private function is_vendor_onboarding_page_configured() { } } /** * Review notice class. * * For displaying asking for review notice in admin panel. * * @since 3.3.1 * * @package dokan */ class PluginReview { /** * ReviewNotice constructor. * * @since 3.3.1 */ public function __construct() { } /** * Show ask for review notice. * * @since 3.3.1 * * @param array $notices * * @return array */ public function show_ask_for_review_notice($notices) { } /** * Reveiw notice action ajax handler. * * @since 3.3.1 * * @return void */ public function review_notice_action_ajax_handler() { } } /** * V4 upgrader notice handler class * * @since 4.0.0 */ class UpgradeToV4 { /** * Class constructor * * @since 4.0.0 */ public function __construct() { } /** * Render upgrade notice. * * @since 4.0.0 * * @param array $notices Existing notices. * * @return array */ public function render_notice($notices) { } } /** * What's new notice handler class * * @since 3.3.3 */ class WhatsNew { /** * Class Constructor * * @since 3.3.3 */ public function __construct() { } /** * Show update notice * * @since 3.3.3 * * @param array $notices * * @return array */ public function show_whats_new_notice($notices) { } /** * Dismiss new notice * * @since 3.3.3 * * @return void */ public function dismiss_new_notice() { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup { class AdminSetupGuide { /** * Steps. * * @since 4.0.0 * * @var array< AbstractStep > */ protected array $steps = []; /** * The setup completed option. * * @var string */ protected string $setup_completed_option = 'dokan_admin_setup_guide_steps_completed'; /** * Get all steps. * * @since 4.0.0 * * @return array< AbstractStep > * * @throws \InvalidArgumentException If the step is not an instance of AbstractStep. */ public function get_steps(): array { } /** * Get the steps mapper. * * @since 4.0.0 * * @return array */ public function get_steps_mapper(): array { } /** * Check if the setup is complete. * * @since 4.0.0 * * @return bool */ public function is_setup_complete(): bool { } /** * Set the setup complete. * * @since 4.0.0 * * @param bool $value The value to set. * * @return bool */ public function set_setup_complete(bool $value = true): bool { } /** * Get the setup complete from option. * * @since 4.0.0 * * @return bool */ public function get_setup_complete(): bool { } /** * Get the styles. * * @since 4.0.0 * * @return array */ public function styles(): array { } /** * Get the scripts. * * @since 4.0.0 * * @return array */ public function scripts(): array { } /** * Register the steps scripts and styles. * * @since 4.0.0 * * @return void */ public function register(): void { } /** * Describe the settings options for frontend. * * @since 4.0.0 * * @return array */ public function settings(): array { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Components { class ComponentFactory { /** * Get a new Page object. * * @param string $id ID. * * @return Page */ public static function page(string $id): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Page { } /** * Get a new tab object. * * @param string $id ID. * * @return Tab */ public static function tab(string $id): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Tab { } /** * Get a new Section object. * * @param string $id ID. * * @return Section */ public static function section(string $id): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Section { } /** * Get a new SubSection object. * * @param string $id ID. * * @return SubSection */ public static function sub_section(string $id): \WeDevs\Dokan\Admin\OnboardingSetup\Components\SubSection { } /** * Get a new Field object. * * @param string $id ID. * @param string $type Field Type. * * @return Text|Number|Checkbox|Radio|Select|Tel|Password|RadioBox|Switcher|MultiCheck|Currency */ public static function field(string $id, string $type = 'text'): \WeDevs\Dokan\Abstracts\SettingsElement { } } /** * Settings element Field. */ class Field extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Is children Supported. * * @var bool $support_children Children support. */ protected $support_children = false; /** * The Input Element Type. * * @var string $input_type The Input Element Type. */ protected $input_type = 'text'; /** * The Settings Element Type. * * @var string $type Type Field. */ protected $type = 'field'; /** * Map for the Input type. * * @var string[] $field_map Map for the Input type. */ protected $field_map = array('text' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text::class, 'number' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Number::class, 'checkbox' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Checkbox::class, 'select' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Select::class, 'radio' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Radio::class, 'tel' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Tel::class, 'password' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Password::class, 'radio_box' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\RadioBox::class, 'switch' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Switcher::class, 'multicheck' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\MultiCheck::class, 'currency' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Currency::class, 'combine_input' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission\CombineInput::class, 'category_based_commission' => \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission\CategoryBasedCommission::class); /** * Constructor. * * @param string $id ID of the input field. * @param string $type Type of the input field. */ public function __construct(string $id, string $type = 'text') { } /** * Get input field. * * @return SettingsElement */ public function get_input(): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Populate The Page Object. * * @return array */ public function populate(): array { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Map input type to respective input class. * * @param string $id ID. * @param string $input_type Input Type. * * @return SettingsElement */ private function input_map(string $id, string $input_type): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return array|float|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param mixed $data Data for display. * * @return mixed */ public function escape_element($data) { } } /** * Field Group Class. */ class FieldGroup extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Settings Element type. * * @var string $type Settings Element type. */ protected $type = 'fieldgroup'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return array|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields { /** * Test Field. */ class Text extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Field { /** * Default Value. * * @var string $default Default. */ protected $default = ''; /** * Placeholder. * * @var string $placeholder Placeholder. */ protected $placeholder = ''; /** * Input field is read-only. * * @var bool $is_readonly Whether to read only. */ protected $is_readonly = false; /** * Whether the field is disabled. * * @var bool $disabled Whether the field is disabled. */ protected $disabled = false; /** * The size of the field. * * @var int $size The size of the field. */ protected $size = 20; /** * Constructor. * * @param string $id Input ID. */ public function __construct(string $id) { } /** * Get Default. * * @return string */ public function get_default(): string { } /** * Set Default. * * @param string $default_value Default value. * * @return SettingsElement */ public function set_default(string $default_value): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Get Placeholder. * * @return string */ public function get_placeholder(): string { } /** * Set placeholder. * * @param string $placeholder Placeholder. * * @return SettingsElement */ public function set_placeholder(string $placeholder): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Is field read only or not. * * @return bool */ public function is_readonly(): bool { } /** * Set readonly flag. * * @param bool $is_readonly Readonly flag. * * @return Text */ public function set_readonly(bool $is_readonly): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { } /** * Check if the field is disabled. * * @return bool */ public function is_disabled(): bool { } /** * Set the field as disabled state. * * @param bool $disabled Whether the field is disabled. * * @return Text */ public function set_disabled(bool $disabled): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { } /** * Get the field size. * * @return int */ public function get_size(): int { } /** * Set the field size. * * @param int $size The size of the field. * * @return Text */ public function set_size(int $size): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return float|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param string $data Data for display. * * @return string */ public function escape_element($data) { } } /** * Checkbox Field. */ class Checkbox extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'checkbox'; /** * Options. * * @var array $options Options. */ protected $options = array(); /** * Get options. * * @return array */ public function get_options(): array { } /** * Set options. * * @param array $options Options. * * @return SettingsElement */ public function set_options(array $options) { } /** * Add an option. * * @param string $option option to Display. * @param string|null $value value for the checkbox option. Default is null. * * @return Checkbox|Select|Radio */ public function add_option(string $option, string $value) { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Escape data for display. * * @param string $data Data for display. * * @return string */ public function escape_element($data): string { } /** * Populate settings array. * * @return array */ public function populate(): array { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission { /** * CategoryBasedCommission Field. */ class CategoryBasedCommission extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Field { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'category_based_commission'; /** * Reset subcategory flag. * * @var string $reset_subcategory Whether to apply parent category commission to subcategories. */ protected $reset_subcategory; /** * Constructor. * * @param string $id Input ID. */ public function __construct(string $id) { } /** * Get Reset Subcategory Flag. * * @return string */ public function get_reset_subcategory(): string { } /** * Set Reset Subcategory Flag. * * @param string $reset_subcategory Reset subcategory flag. * * @return CategoryBasedCommission */ public function set_reset_subcategory(string $reset_subcategory): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission\CategoryBasedCommission { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } /** * Escape data for display. * * @param mixed $data Data for display. * * @return string */ public function escape_element($data) { } } /** * CombineInput Field. */ class CombineInput extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Field { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'combine_input'; /** * Additional fee. * * @var string $additional_fee Fixed value. */ protected $additional_fee = ''; /** * Percentage value. * * @var string $admin_percentage Percentage value. */ protected $admin_percentage = ''; /** * Constructor. * * @param string $id Input ID. */ public function __construct(string $id) { } /** * Get fixed value. * * @return string */ public function get_additional_fee(): string { } /** * Set fixed value. * * @param string $additional_fee Fixed value. * * @return CombineInput */ public function set_additional_fee(string $additional_fee): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission\CombineInput { } /** * Get percentage value. * * @return string */ public function get_admin_percentage(): string { } /** * Set percentage value. * * @param string $percentage Percentage value. * * @return CombineInput */ public function set_admin_percentage(string $percentage): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Commission\CombineInput { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } /** * Escape data for display. * * @param mixed $data Data for display. * * @return string */ public function escape_element($data): string { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields { class Currency extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'currency'; /** * Currency symbol. * * @var string $currency_symbol Currency symbol. */ protected string $currency_symbol; /** * Populate settings array. * * @return array */ public function populate(): array { } /** * Get currency symbol. * * @return string */ public function get_currency_symbol(): ?string { } /** * Set currency symbol. * * @param string $currency_symbol Currency symbol. * * @return Currency */ public function set_currency_symbol(string $currency_symbol): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Currency { } } /** * CheckboxGroup Field. */ class MultiCheck extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Field { /** * Default Value. * * @var array $default Default. */ protected $default = []; /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'multicheck'; /** * Options. * * @var array $options Options. */ protected $options = array(); /** * Constructor. * * @param string $id Input ID. */ public function __construct(string $id) { } /** * Get options. * * @return array */ public function get_options(): array { } /** * Set options. * * @param array $options Options. * * @return SettingsElement */ public function set_options(array $options) { } /** * Add an option. * * @param string $option option to Display. * @param string|null $value value for the checkbox option. Default is null. * * @return MultiCheck */ public function add_option(string $option, string $value) { } /** * Get Default. * * @return array */ public function get_default(): array { } /** * Set Default. * * @param array $default_value Default value. * * @return SettingsElement */ public function set_default($default_value): \WeDevs\Dokan\Abstracts\SettingsElement { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * Test Field. */ class Number extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'number'; /** * Minimum. * * @var float $minimum Minimum. */ protected $minimum; /** * Maximum. * * @var float Maximum. */ protected $maximum; /** * Increment number. * * @var float $step Increment number. */ protected $step = 0.1; /** * Get minimum value. * * @return float */ public function get_minimum(): ?float { } /** * Set minimum value. * * @param float $minimum The minimum value. * * @return Number */ public function set_minimum(float $minimum): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Number { } /** * Get minimum value. * * @return float */ public function get_maximum(): ?float { } /** * Set maximum value. * * @param float $maximum Value. * * @return Number */ public function set_maximum(float $maximum): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Number { } /** * Get step value. * * @return float */ public function get_step(): ?float { } /** * Set step value. * * @param float $step Value. * * @return Number */ public function set_step(float $step): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Number { } /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return mixed */ public function sanitize_element($data) { } /** * Escape data for display. * * @param string $data Data for display. * * @return float */ public function escape_element($data): float { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * Test Field. */ class Password extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'password'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * Checkbox Field. */ class Radio extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Checkbox { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'radio'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Escape data for display. * * @param string $data Data for display. * * @return string */ public function escape_element($data): string { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * RadioButton Field. * * Custom field that provides radio options as button. */ class RadioBox extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Radio { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'radio_box'; } /** * Select Field. */ class Select extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Checkbox { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'select'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Escape data for display. * * @param string $data Data for display. * * @return string */ public function escape_element($data): string { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * Switcher Field. * * Custom field that provides a toggle switch for boolean values. */ class Switcher extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Radio { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'switch'; /** * Options. * * @var array $options Options. */ protected $states = array(); /** * Get options. * * @return array */ public function get_states(): array { } /** * Set active value. * * @param string $label Enable state label. * @param string $value Enable state value. * * @return Switcher */ public function set_enable_state(string $label, string $value): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Switcher { } /** * Get active value. * * @return array */ public function get_enable_state(): array { } public function set_disable_state(string $label, string $value): \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Switcher { } /** * Get active value. * * @return array */ public function get_disable_state(): array { } /** * Populate settings array. * * @return array */ public function populate(): array { } } /** * Test Field. */ class Tel extends \WeDevs\Dokan\Admin\OnboardingSetup\Components\Fields\Text { /** * Input Type. * * @var string $input_type Input Type. */ protected $input_type = 'tel'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Populate settings array. * * @return array */ public function populate(): array { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Components { /** * Page Class. */ class Page extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Settings Element type. * * @var string $type Settings Element type. */ protected $type = 'page'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return array|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } } /** * Section Class. */ class Section extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Settings Element type. * * @var string $type Settings Element type. */ protected $type = 'section'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return array|string */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } } /** * Subsection Class. */ class SubSection extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Settings Element type. * * @var string $type Settings Element type. */ protected $type = 'subsection'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return mixed */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } } /** * Tab Class. */ class Tab extends \WeDevs\Dokan\Abstracts\SettingsElement { /** * Settings Element type. * * @var string $type Settings Element type. */ protected $type = 'tab'; /** * Data validation. * * @param mixed $data Data for validation. * * @return bool */ public function data_validation($data): bool { } /** * Sanitize data for storage. * * @param mixed $data Data for sanitization. * * @return mixed */ public function sanitize_element($data) { } /** * Escape data for display. * * @param array $data Data for display. * * @return array */ public function escape_element($data): array { } } } namespace WeDevs\Dokan\Admin\OnboardingSetup\Steps { /** * The step interface. * * @since 4.0.0 */ interface StepInterface { /** * Get the step ID. * * @since 4.0.0 * * @return string The step ID. */ public function get_id(): string; /** * Get settings options to check for. * * @since 4.0.0 * * @return string[] The settings options. */ public function get_settings_options(): array; /** * Get the step priority. * * @since 4.0.0 * * @return int The step priority. */ public function get_priority(): int; /** * Get the step skippable or not. * * @since 4.0.0 * * @return bool */ public function get_skippable(): bool; /** * Register the step scripts and styles. * * @since 4.0.0 * * @return void */ public function register(); /** * Get the step scripts. * * @since 4.0.0 * * @return array The step scripts. */ public function scripts(): array; /** * Get the step styles. * * @since 4.0.0 * * @return array The step styles. */ public function styles(): array; /** * Pass the settings options to frontend. * * @since 4.0.0 * * @return array The settings options. */ public function settings(): array; /** * Describe the settings options. * * @since 4.0.0 * * @return void */ public function option_dispatcher($data): void; } /** * The abstract step class. * * @since 4.0.0 */ abstract class AbstractStep extends \WeDevs\Dokan\Abstracts\Settings implements \WeDevs\Dokan\Admin\OnboardingSetup\Steps\StepInterface, \WeDevs\Dokan\Contracts\Hookable { /** * The step ID. * * @var string */ protected $id = ''; /** * The step priority. * * @var int */ protected int $priority = 100; /** * The step skippable or not. * The default is true. * * @var bool $skippable The step skippable or not. */ protected bool $skippable = true; /** * The storage key. * * @var string */ protected $storage_key = 'dokan_admin_onboarding_setup_step'; /** * The settings options. * * @var array */ protected $settings_options = []; /** * Get the step ID. * * @since 4.0.0 * * @return string */ public function get_id(): string { } /** * Register the hooks. * * @since 4.0.0 * * @return void */ public function register_hooks(): void { } /** * Enlist the steps. * * @since 4.0.0 * * @param AbstractStep[] $steps The steps to enlist. * * @return AbstractStep[] The enlisted steps. */ public function enlist(array $steps): array { } /** * Get the step priority. * * @since 4.0.0 * * @return int */ public function get_priority(): int { } /** * Get the step skippable or not. * * @since 4.0.0 * * @return bool */ public function get_skippable(): bool { } /** * Register the scripts and styles. * * @since 4.0.0 * * @return void */ abstract public function register(): void; /** * Get the scripts. * * @since 4.0.0 * * @return array */ abstract public function scripts(): array; /** * Get the styles. * * @since 4.0.0 * * @return array */ abstract public function styles(): array; /** * Describe the settings options. * * @since 4.0.0 * * @return void */ abstract public function describe_settings(): void; /** * Get the settings options for frontend. * * @since 4.0.0 * * @return array */ abstract public function settings(): array; /** * Dispatch the options to settings options. * * @since 4.0.0 * * @param mixed $data The data to dispatch. * * @return void */ abstract public function option_dispatcher($data): void; /** * Get the settings options. * * @since 4.0.0 * * @return array */ public function get_settings_options(): array { } /** * Get the settings options. * * @since 4.0.0 * * @return bool */ public function is_completed(): bool { } /** * Dispatch the options to settings options. * * @since 4.0.0 * * @param mixed $data The data to dispatch. * * @return void */ public function dispatch($data): void { } /** * Listen for settings save. * * @since 4.0.0 * * @param string $option The option to listen for. * * @return void */ public function listen_for_settings_save($option) { } /** * Mark the step as complete. * * @since 4.0.0 * * @return void */ public function mark_as_complete() { } } class AppearanceStep extends \WeDevs\Dokan\Admin\OnboardingSetup\Steps\AbstractStep { /** * The step ID. * * @var string The step ID. */ protected $id = 'appearance'; /** * The step priority. * * @var int The step priority. */ protected int $priority = 40; /** * The settings options. * * @var array The settings options. */ protected $settings_options = ['dokan_appearance']; /** * The storage key. * * @var string The storage key. */ protected $storage_key = 'dokan_admin_onboarding_setup_step_appearance'; /** * Get default appearance settings * * @since 4.0.0 * * @return array Default appearance settings */ protected function get_default_settings(): array { } /** * @inheritDoc */ public function register(): void { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function describe_settings(): void { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function option_dispatcher($data): void { } } class BasicStep extends \WeDevs\Dokan\Admin\OnboardingSetup\Steps\AbstractStep { /** * The step ID. * * @var string The step ID. */ protected $id = 'basic'; /** * The step priority. * * @var int The step priority. */ protected int $priority = 10; /** * The step skippable or not. * The default is true. * * @var bool $skippable The step skippable or not. */ protected bool $skippable = false; /** * The settings options. * * @var array The settings options. */ protected $settings_options = ['dokan_selling']; /** * The storage key. * * @var string The storage key. */ protected $storage_key = 'dokan_admin_onboarding_setup_step_basic'; /** * Get default basic settings * * @since 4.0.0 * * @return array Default basic settings */ protected function get_default_settings(): array { } /** * @inheritDoc */ public function register(): void { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function describe_settings(): void { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function option_dispatcher($data): void { } } class CommissionStep extends \WeDevs\Dokan\Admin\OnboardingSetup\Steps\AbstractStep { /** * The step ID. * * @var string The step ID. */ protected $id = 'commission'; /** * The step priority. * * @var int The step priority. */ protected int $priority = 20; /** * The settings options. * * @var array The settings options. */ protected $settings_options = ['dokan_selling']; /** * The storage key. * * @var string The storage key. */ protected $storage_key = 'dokan_admin_onboarding_setup_step_commission'; /** * Get default commission settings * * @since 4.0.0 * * @return array Default commission settings */ protected function get_default_settings(): array { } /** * @inheritDoc */ public function register(): void { } /** * @inheritDoc */ public function scripts(): array { } /** * @inheritDoc */ public function styles(): array { } /** * @inheritDoc */ public function describe_settings(): void { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function option_dispatcher($data): void { } } class WithdrawStep extends \WeDevs\Dokan\Admin\OnboardingSetup\Steps\AbstractStep { /** * The step ID. * * @var string The step ID. */ protected $id = 'withdraw'; /** * The step priority. * * @var int The step priority. */ protected int $priority = 30; /** * The storage key. * * @var string The storage key. */ protected $storage_key = 'dokan_admin_onboarding_setup_step_withdraw'; /** * The settings options. * * @var array The settings options. */ protected $settings_options = ['dokan_withdraw']; /** * Get default withdraw settings * * @since 4.0.0 * * @return array Default withdraw settings */ protected function get_default_settings(): array { } /** * @inheritDoc */ public function register(): void { } /** * @inheritDoc */ public function scripts(): array { } public function styles(): array { } /** * @inheritDoc */ public function describe_settings(): void { } /** * @inheritDoc */ public function settings(): array { } /** * @inheritDoc */ public function option_dispatcher($data): void { } } } namespace WeDevs\Dokan\Admin { /** * Dokan_Admin_Pointers Class. */ class Pointers { /** * Hold current screen ID * * @var integer */ private $screen_id; /** * Constructor. */ public function __construct() { } /** * Dismiss a screen pointers after clicking dismiss * * @param String $screen * * @return void */ public function dismiss_screen($screen = false) { } /** * Check if pointers for screen is dismissed * * @param String $screen * * @return bool */ public function is_dismissed($screen) { } /** * Setup pointers for screen. */ public function setup_pointers_for_screen() { } /** * Render pointers on Dashboard Page */ public function dashboard_tutorial() { } /** * Renders Settings tutorial pointers * * @return void */ public function settings_tutorial() { } /** * Enqueue pointers and add script to page. * @param array $pointers */ public function enqueue_pointers($pointers) { } } /** * Promotion class * * For displaying AI base add on admin panel */ class Promotion extends \WeDevs\Dokan\Abstracts\DokanPromotion { /** * Time interval for displaying promo * * @var integer */ public $time_interval = 60 * 60 * 24 * 7; /** * Promo option key * * @var string */ public $promo_option_key = '_dokan_free_upgrade_promo'; /** * Get prmotion data * * @since 1.0.0 * * @return void */ public function get_promotion_data() { } } /** * Recommended Plugins Class. * * @since 4.0.0 */ class RecommendedPlugins { /** * Array of Recommended Plugins. * * @var array */ protected array $plugins; /** * Class Constructor. * * @since 4.0.0 */ public function __construct() { } /** * Get All Enlisted Plugins. * * @since 4.0.0 * * @return array */ protected function get_enlisted_plugins(): array { } /** * Is Plugin Active. * * @since 4.0.0 * * @param string $basename * * @return bool */ protected function is_active(string $basename): bool { } /** * Get List of Recommended Inactive Plugins. * * @since 4.0.0 * * @return array */ public function get(): array { } } } namespace WeDevs\Dokan\Traits { trait AjaxResponseError { /** * Send Ajax error response * * @since 3.0.0 * * @param \Exception $e * @param string $default_message * * @return void */ protected static function send_response_error(\Exception $e, $default_message = '') { } } } namespace WeDevs\Dokan\Admin { /** * Admin Settings Class * * @since 3.0.0 * * @package dokan */ class Settings { use \WeDevs\Dokan\Traits\AjaxResponseError; /** * Load automatically when class initiate * * @since 1.0.0 */ public function __construct() { } /** * Set unselected Withdraw Methods * * @since 3.6.0 * * @param mixed $option_name * @param mixed $option_value * * @return void|mixed $option_value */ public function set_withdraw_limit_gateways($option_value, $option_name) { } /** * Set commission type as fixed if no commission is set. * * @since 3.14.0 * * @param mixed $option_name * @param mixed $option_value * * @return void|mixed $option_value */ public function set_commission_type_if_not_set($option_value, $option_name) { } /** * Validate price values for saving fixed price settings. * * @since 3.14.0 * * @param string $option_name * @param array $option_values * * @return array */ public function validate_fixed_price_values($option_values, $option_name) { } /** * Get settings values * * @since 2.8.2 * * @return void */ public function get_settings_value() { } /** * Save settings value * * @since 2.8.2 * * @return void */ public function save_settings_value() { } /** * Sanitize callback for Settings API * * @param $options * @param string $context * * @return mixed */ public function sanitize_options($options, $context = 'read') { } /** * Get sanitization callback for given option slug * * @param string $slug option slug * @param string $context * * @return mixed string or bool false */ public function get_sanitize_callback($slug = '', $context = 'read') { } /** * Load settings sections and fields * * @since 2.8.2 * * @param $data * * @return void */ public function settings_localize_data($data) { } /** * Get Post Type array * * @since 1.0 * * @param string $post_type * * @return array */ public function get_post_type($post_type) { } /** * Get all settings Sections * * @since 1.0.0 * * @return array */ public function get_settings_sections() { } /** * Returns all the settings fields * * @since 1.0.0 * * @return array settings fields */ public function get_settings_fields() { } /** * Add settings after specific option * * @since 2.9.11 * * @param string $section Name of the section * @param string $option Name of the option after which we wish to add new settings * @param array $additional_settings New settings/options * @param array $settings_fields Current settings * * @return array */ public function add_settings_after($settings_fields, $section, $option, $additional_settings) { } /** * Add settings nonce to localized vars * * @since 3.0.6 * * @param array $vars * * @return array */ public function add_admin_settings_nonce($vars) { } /** * Get refreshed options for a admin setting * * @since 3.0.6 * * @return void */ public function refresh_admin_settings_field_options() { } /** * Validates admin withdraw limit settings * * @since 3.2.15 * * @param mixed $option_name * @param mixed $option_value * * @return void|mixed $option_value */ public function set_withdraw_limit_value_validation($option_name, $option_value) { } /** * Dokan data clear setting * * @since 3.2.15 * * @return array $settings_fields */ public function add_dokan_data_clear_setting($settings_fields) { } /** * Sanitize custom store URL to prevent reserved WordPress keywords * * @since 4.1.5 * * @param string $value The custom store URL value * * @return string * @throws DokanException */ public function sanitize_custom_store_url($value) { } /** * Set the default settings for vendor layout. * * @since 4.2.0 * * @param mixed $option_name * @param mixed $option_value * * @return void|mixed $option_value */ public function set_vendor_latest_layout($option_value, $option_name) { } } /** * Setup wizard class * * Walkthrough to the basic setup upon installation */ class SetupWizard { /** @var string Current Step */ protected string $current_step = ''; /** @var string custom logo url of the theme */ protected $custom_logo = ''; /** @var array Steps for the setup wizard */ protected $steps = []; /** * Actions to be executed after the HTTP response has completed * * @var array */ private $deferred_actions = []; /** * Instance of RecommendedPlugins class for managing plugin recommendations. * * @since 4.0.0 * * @var RecommendedPlugins Handles the retrieval and management of recommended plugins */ private \WeDevs\Dokan\Admin\RecommendedPlugins $recommended_plugins; /** * Hook in tabs. */ public function __construct() { } /** * Give manage_woocommerce cap to admin if not there. * * @param array $caps * * @return array */ public function set_user_cap($caps) { } /** * Enqueue scripts & styles * * @return void */ public function enqueue_scripts() { } /** * Enqueue scripts for admin onboarding setup. * * @since 4.0.0 * * @return void */ public function register_admin_scripts() { } /** * Enqueue scripts for admin onboarding setup. * * @since 4.0.0 * * @return void */ public function enqueue_admin_scripts() { } /** * Helper method to get postcode configurations from `WC()->countries->get_country_locale()`. * We don't use `wp_list_pluck` because it will throw notices when postcode configuration is not defined for a country. * * @return array */ protected static function get_postcodes() { } /** * Add admin menus/screens. */ public function admin_menus() { } /** * Set wizard steps * * @since 2.9.27 * * @return void */ protected function set_steps() { } /** * Get wizard steps * * @since 2.9.27 * * @return array */ public function get_steps() { } /** * Wizard templates * * @since 2.9.27 * * @return void */ protected function set_setup_wizard_template() { } /** * Show the setup wizard. */ public function setup_wizard() { } public function get_next_step_link() { } /** * Setup Wizard Header. */ public function setup_wizard_header() { } /** * Setup Wizard Footer. */ public function setup_wizard_footer() { } /** * Output the steps. */ public function setup_wizard_steps() { } /** * Output the content for the current step. */ public function setup_wizard_content() { } /** * Introduction step. */ public function dokan_setup_introduction() { } /** * Store step. */ public function dokan_setup_store() { } /** * Save store options. */ public function dokan_setup_store_save() { } /** * Selling step. */ public function dokan_setup_selling() { } /** * Commission step. * * @since 3.14.5 * * @return void */ public function dokan_setup_commission() { } /** * Save selling options. */ public function dokan_setup_selling_save() { } /** * Save commission options. * * @since 3.14.5 * * @return void */ public function dokan_setup_commission_save() { } /** * Withdraw Step. */ public function dokan_setup_withdraw() { } /** * Recommended Step * * @since 2.8.7 * * @return void */ public function dokan_setup_recommended() { } /** * Save data from recommended step * * @since 2.8.7 * * @return void */ public function dokan_setup_recommended_save() { } /** * Determines if a plugin should be installed based on POST data. * * @since 4.0.0 * * @param array $plugin Plugin configuration array * * @return bool */ private function should_install_plugin(array $plugin): bool { } /** * Save withdraw options. */ public function dokan_setup_withdraw_save() { } /** * Final step. */ public function dokan_setup_ready() { } /** * Should we display the 'Recommended' step? * * True if at least one of the recommendations will be displayed. * * @return boolean */ protected function should_show_recommended_step() { } /** * Whether the current user may install plugins through Dokan. * * Authorizes the wizard and onboarding install sinks, and gates the visibility of * the 'Recommended' step. Both capabilities are required because the queued * installer activates whatever it downloads. * * @since 5.0.14 Made public for the onboarding controller, and added the * `activate_plugins` requirement. * * @return boolean */ public function user_can_install_plugin() { } protected function display_recommended_item($item_info) { } /** * Plugin install info message markup with heading. */ public function plugin_install_info() { } /** * Helper method to queue the background install of a plugin. * * @param string $plugin_id Plugin id used for background install. * @param array $plugin_info Plugin info array containing name and repo-slug, and optionally file if different from [repo-slug].php. */ public function install_plugin($plugin_id, $plugin_info) { } /** * Function called after the HTTP request is finished, so it's executed without the client having to wait for it. * * @see WC_Admin_Setup_Wizard::install_plugin * @see WC_Admin_Setup_Wizard::install_theme */ public function run_deferred_actions() { } /** * Finishes replying to the client, but keeps the process running for further (async) code execution. * * @see https://core.trac.wordpress.org/ticket/41358 . */ protected function close_http_connection() { } } class SetupWizardNoWC extends \WeDevs\Dokan\Admin\SetupWizard { /** * Set wizard steps * * @since 2.9.27 * * @return void */ protected function set_steps() { } /** * Should show any recommended step * * @since 2.9.27 * * @return bool */ protected function should_show_recommended_step() { } /** * Enqueue wizard scripts * * @since 2.9.27 * * @return void */ public function enqueue_scripts() { } /** * Wizard templates * * @since 2.9.27 */ protected function set_setup_wizard_template() { } /** * Setup wizard main content * * @since 2.9.27 * * @return void */ public function setup_wizard_content() { } /** * Setup wizard footer * * @since 2.9.27 * * @return void */ public function setup_wizard_footer() { } /** * Introduction page * * @since 2.9.27 * * @return void */ public function step_introduction() { } /** * Install WooCommerce and redirect to store setup step * * @since 2.9.27 * * @return void */ public function install_woocommerce() { } /** * Get WooCommerce Setup wizard * * @since 2.9.27 * * @param array $steps * * @return \WeDevs\Dokan\Admin\SetupWizardWCAdmin */ protected static function get_wc_setup_wizard($steps = []) { } /** * Add WooCommerce steps in Dokan admin setup wizard * * @since 2.9.27 * * @param array $steps */ public static function add_wc_steps_to_wizard($steps) { } /** * Add WC localized scripts * * @since 2.9.27 * * @return void */ public static function enqueue_wc_localized_scripts() { } /** * Add WC fields to Store setup form * * @since 2.9.27 * * @return void */ public static function add_wc_html_step_start() { } /** * Save WC data in store setup step * * @since 2.9.27 * * @return void */ public static function save_wc_store_setup_data() { } /** * WC payment setup step form * * @since 2.9.27 * * @return void */ public static function wc_setup_payment() { } /** * WC payment step post data handler * * @since 2.9.27 * * @param SetupWizard $dokan_admin_setup_wizard * * @return void */ public static function wc_setup_payment_save($dokan_admin_setup_wizard) { } /** * WC shipping setup step form * * @since 2.9.27 * * @return void */ public static function wc_setup_shipping() { } /** * WC shipping step post data handler * * @since 2.9.27 * * @param SetupWizard $dokan_admin_setup_wizard * * @return void */ public static function wc_setup_shipping_save($dokan_admin_setup_wizard) { } } class SetupWizardWCAdmin extends \WC_Admin_Setup_Wizard { /** * Current step * * @since 2.9.27 * * @var string */ private $step = ''; /** * Steps for the setup wizard * * @since 2.9.27 * * @var array */ private $steps = array(); /** * Class constuctor * * @since 2.9.27 * * @param array $steps * * @return void */ public function __construct($steps = array()) { } /** * Set current step * * @since 2.9.27 * * @param string $step */ public function set_step($step) { } /** * WooCommerce Shipping setup step * * @see WC_Admin_Setup_Wizard::wc_setup_shipping Override the input/checkbox only * * @since 2.9.27 * * @return void */ public function wc_setup_shipping() { } /** * Display service item in list. * * @see WC_Admin_Setup_Wizard::display_service_item Override input/checkbox only * * @param int $item_id Item ID. * @param array $item_info Item info array. * * @return void */ public function display_service_item($item_id, $item_info) { } /** * Get the URL for the next step's screen. * * @see WC_Admin_Setup_Wizard::get_next_step_link Without the override, $this in parent class * will refer to parent class object * * @since 2.9.27 * * @param string $step slug (default: current step). * @return string URL for next step if a next step exists. * Admin URL if it's the last step. * Empty string on failure. * * @return void */ public function get_next_step_link($step = '') { } } } namespace WeDevs\Dokan\Admin\Status { class Button extends \WeDevs\Dokan\Abstracts\StatusElement { const REQUEST_GET = 'GET'; const REQUEST_POST = 'POST'; /** * @var string */ protected string $type = 'button'; /** * @var string */ protected string $request = self::REQUEST_GET; /** * @var string */ protected string $endpoint = ''; protected array $payload = []; /** * @return string */ public function get_request(): string { } /** * @param string $request * * @return Button */ public function set_request(string $request): \WeDevs\Dokan\Admin\Status\Button { } /** * @return string */ public function get_endpoint(): string { } /** * @param string $endpoint * * @return Button */ public function set_endpoint(string $endpoint): \WeDevs\Dokan\Admin\Status\Button { } /** * @return array */ public function get_payload(): array { } /** * @param array $payload * * @return Button */ public function set_payload(array $payload): \WeDevs\Dokan\Admin\Status\Button { } /** * @inheritDoc */ public function render(): array { } /** * @inheritDoc */ public function escape_data(string $data): string { } } class Heading extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'heading'; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Link extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'link'; protected string $url = ''; protected string $title_text = ''; /** * @return string */ public function get_url(): string { } /** * @param string $url * * @return Link */ public function set_url(string $url): \WeDevs\Dokan\Admin\Status\Link { } /** * @return string */ public function get_title_text(): string { } /** * @param string $title_text * * @return Link */ public function set_title_text(string $title_text): \WeDevs\Dokan\Admin\Status\Link { } /** * @inheritDoc */ public function render(): array { } /** * @inheritDoc */ public function escape_data(string $data): string { } } class Page extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'page'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Paragraph extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'paragraph'; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Section extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'section'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Status extends \WeDevs\Dokan\Abstracts\StatusElement { protected bool $support_children = true; protected string $hook_key = 'dokan_status'; public function __construct() { } /** * @inheritDoc */ public function escape_data(string $data): string { } public function render(): array { } /** * Describe the settings options. * * @return void * @throws Exception */ public function describe() { } } class StatusElementFactory { /** * Get a new Page object. * * @param string $id ID. * * @return Page */ public static function page(string $id): \WeDevs\Dokan\Admin\Status\Page { } /** * Get a new tab object. * * @param string $id ID. * * @return Tab */ public static function tab(string $id): \WeDevs\Dokan\Admin\Status\Tab { } /** * Get a new Section object. * * @param string $id ID. * * @return Section */ public static function section(string $id): \WeDevs\Dokan\Admin\Status\Section { } /** * Get a new SubSection object. * * @param string $id ID. * * @return SubSection */ public static function sub_section(string $id): \WeDevs\Dokan\Admin\Status\SubSection { } /** * Get a new Table object. * * @param string $id ID. * * @return Table */ public static function table(string $id): \WeDevs\Dokan\Admin\Status\Table { } public static function table_row(string $id): \WeDevs\Dokan\Admin\Status\TableRow { } public static function table_column(string $id): \WeDevs\Dokan\Admin\Status\TableColumn { } public static function paragraph(string $id): \WeDevs\Dokan\Admin\Status\Paragraph { } public static function heading(string $id): \WeDevs\Dokan\Admin\Status\Heading { } public static function link(string $id): \WeDevs\Dokan\Admin\Status\Link { } public static function button(string $id): \WeDevs\Dokan\Admin\Status\Button { } } class SubSection extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'sub-section'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Tab extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'tab'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } class Table extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'table'; protected bool $support_children = true; protected array $headers = []; /** * @return array */ public function get_headers(): array { } /** * @param array $headers * * @return Table */ public function set_headers(array $headers): \WeDevs\Dokan\Admin\Status\Table { } public function render(): array { } /** * @inheritDoc */ public function escape_data(string $data): string { } } class TableColumn extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'table-column'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } class TableRow extends \WeDevs\Dokan\Abstracts\StatusElement { /** * @var string */ protected string $type = 'table-row'; protected bool $support_children = true; /** * @inheritDoc */ public function escape_data(string $data): string { } } } namespace WeDevs\Dokan\Admin\Tools { /** * Shared service hosting the free admin Tools actions. * * The same logic backs both the REST controller (React dashboard) and the AJAX * handlers (legacy Vue admin), so a tool behaves identically across both UIs. * * @since 5.0.9 */ class ToolsActions { /** * Default Dokan pages the "Installation Guide" tool ensures exist. * * @since 5.0.9 * * @return array> */ protected function get_default_pages(): array { } /** * Create any missing Dokan default pages. * * Unlike the installer (which bails once `dokan_pages_created` is set), this * recreates only the pages that are actually missing, so an admin can recover * an accidentally-deleted page from the Tools screen at any time. * * @since 5.0.9 * * @return array */ public function create_default_pages() { } /** * Whether the Dokan default pages have already been created. * * @since 5.0.9 * * @return array */ public function check_all_dokan_pages_exists() { } /** * Clear all Dokan-related caches (transients + object cache). * * Removes Dokan's DB transients (cached data, group version markers and their * timeouts) so installs without a persistent object cache are trimmed, then * flushes the object cache so data held in a persistent backend (Redis/Memcached) * is rebuilt on demand. * * @since 5.0.9 * * @return array */ public function clear_dokan_caches() { } } } namespace WeDevs\Dokan\Admin { /** * User List related tasks for wp-admin. * Adds Pending Vendor tab and Approve Vendors bulk action. * * @since 4.2.4 * * @package Dokan */ class UserList { /** * Class Constructor. */ public function __construct() { } /** * Add Pending Vendor view to user's list. * * @since 4.2.4 * * @param array $views Existing views * * @return array Modified views */ public function add_pending_vendor_view($views) { } /** * Filter users to show only pending vendors. * * @param \WP_User_Query $query User query object * * @return \WP_User_Query */ public function filter_pending_vendors($query) { } /** * Add bulk actions to the user's list. * * @since 4.2.4 * * @param array $actions Existing bulk actions * * @return array Modified bulk actions */ public function add_bulk_actions($actions) { } /** * Handle bulk actions. * * @since 4.2.4 * * @param string $sendback Redirect URL * @param string $doaction Action being performed * @param array $user_ids User IDs to process * * @return string Modified redirect URL */ public function handle_bulk_actions($sendback, $doaction, $user_ids) { } /** * Show admin notices for bulk actions. * * @since 4.2.4 * * @return void */ public function show_bulk_action_notices() { } } /** * User profile related tasks for wp-admin * * @package Dokan */ class UserProfile { public function __construct() { } /** * Enqueue Script in admin profile * * @param string $page * * @return void */ public function enqueue_scripts($page) { } /** * Add fields to user profile * * @param \WP_User $user * * @return void|false */ public function add_meta_fields($user) { } /** * Save user data * * @param int $user_id * * @return void */ public function save_meta_fields($user_id) { } } /** * WithdrawLogExporter for Log Export. * * @since 3.8.3 * * @package dokan */ class WithdrawLogExporter extends \WC_CSV_Batch_Exporter { /** * Type of export used in filter names. * * @since 3.8.3 * * @var string */ protected $export_type = 'withdraw'; /** * Filename to export to. * * @since 3.8.3 * * @var string */ protected $filename = 'dokan-withdraw-log-export.csv'; /** * Items to export. * * @since 3.8.3 * * @var array */ protected $items = []; /** * Total rows to export. * * @since 3.8.3 * * @var int */ protected $total_rows = 0; /** * Decimal places. * * @since 3.8.3 * * @var int */ protected $decimal_places = 2; /** * Get column names. * * @since 3.8.3 * * @return array */ public function get_column_names() { } /** * Set items for export. * * @since 3.8.3 * * @param array $items */ public function set_items($items = []) { } /** * Set total rows. * * @since 3.8.3 * * @param int $total_rows */ public function set_total_rows($total_rows) { } /** * Return an array of columns to export. * * @since 3.8.3 * * @return array */ public function get_default_column_names() { } /** * Prepare formatted data to export. * * @since 3.8.3 * * @return void */ public function prepare_data_to_export() { } /** * Take a withdraw item and generate row data from it for export. * * @since 3.8.3 * * @param $withdraw_item * * @return array */ protected function generate_row_data($withdraw_item) { } /** * Get value from withdraw item by key. * * @since 3.8.3 * * @param $withdraw_item * @param $key * * @return mixed */ protected function get_column_value($withdraw_item, $key) { } /** * Get total % complete. * * @since 3.8.3 * * @return int */ public function get_percent_complete() { } } } namespace WeDevs\Dokan { /** * Ajax handler for Dokan */ class Ajax { /** * Class constructor * * @return void */ public function __construct() { } /** * Create the Dokan default pages (legacy Vue admin Tools page). * * @since 5.0.9 * * @return void */ public function create_pages() { } /** * Check whether all Dokan pages exist (legacy Vue admin Tools page). * * @since 5.0.9 * * @return void */ public function check_all_dokan_pages_exists() { } /** * Clear all Dokan caches (legacy Vue admin Tools page). * * @since 5.0.9 * * @return void */ public function clear_caches() { } /** * Create product from popup submission * * @since 2.5.0 * * @return void */ public function create_product() { } /** * Check the availability of shop name. * * @return void */ public function shop_url_check() { } /** * Mark a order as complete * * Fires from seller dashboard in frontend */ public function complete_order() { } /** * Mark a order as processing * * Fires from frontend seller dashboard */ public function process_order() { } /** * Grant download permissions via ajax function * * @return void */ public function grant_access_to_download() { } /** * Update a order status * * @return void */ public function change_order_status() { } /** * Seller store page email contact form handler * * Catches the form submission from store page */ public function contact_seller() { } /** * Rovoke file download access for customer * * @return void */ public function revoke_access_to_download() { } /** * Add order note via ajax */ public function add_order_note() { } /** * Add shipping tracking info via ajax */ public function add_shipping_tracking_info() { } /** * Delete order note via ajax */ public function delete_order_note() { } /** * Search seller listing * * @return void */ public function seller_listing_search() { } /** * Gets attachment uploaded by Media Manager, crops it, then saves it as a * new object. Returns JSON-encoded object details. * * @since 2.5 * * @return void */ public function crop_store_banner() { } /** * Search product using term * * @since 2.6.8 * * @return void */ public function json_search_product() { } /** * Search product tags * * @since 3.0.5 * * @return array */ public function dokan_json_search_products_tags() { } /** * Get Child based on parent id * * @param $parent_id int * @param $brands array * @param $level int * * @return void * * @since 4.0.0 */ public function get_child_terms_recursive(int $parent_id, array &$brands, int $level) { } /** * Search product brand * * @since 4.0.0 * * @return void */ public function dokan_json_search_products_brands() { } /** * Search customer * * @since 2.8.3 * * @return array */ public function dokan_json_search_vendor_customers() { } /** * Calculate width and height based on what the currently selected theme supports. * * @since 2.5 * * @param array $dimensions * * @return array dst_height and dst_width of header image */ final public function get_header_dimensions($dimensions) { } /** * Create an attachment 'object'. * * @since 2.5 * * @param string $cropped cropped image URL * @param int $parent_attachment_id attachment ID of parent image * * @return array attachment object */ final public function create_attachment_object($cropped, $parent_attachment_id) { } /** * Insert an attachment and its metadata. * * @since 2.5 * * @param array $object attachment object * @param string $cropped cropped image URL * * @return int attachment ID */ final public function insert_attachment($object, $cropped) { } /** * Get contents for login form popup * * @since 2.9.11 * * @return void */ public function get_login_form() { } /** * Login user * * @since 2.9.11 * * @return void */ public static function login_user() { } /** * Export witdraw requests * * @since 3.0.0 * * @return void */ public function withdraw_export_csv() { } /** * Dismiss the Dokan upgrade notice. * * @since 3.1 * * @return void */ public function dismiss_pro_notice() { } } } namespace WeDevs\Dokan\Analytics { class Assets implements \WeDevs\Dokan\Contracts\Hookable { public function register_hooks(): void { } /** * Localize the data following the similar data structure of the WC admin settings. * * @param array $settings * @return array */ protected function localize_wc_admin_settings($settings = []) { } /** * Register all Dokan scripts and styles. * * @return void */ public function register_all_scripts() { } /** * Disable "doing it wrong" error * * @return bool */ public function disable_doing_it_wrong_error() { } /* * Get the chunks for analytics scripts, it generates the chunks based on the scripts that are used in the analytics section. * This is used to register the scripts for translations support * * @since 4.0.6 * * @return array */ public function get_analytics_chunks() { } /** * Register scripts. * * @param array $scripts * * @return void */ public function register_scripts() { } /** * Enqueue front-end scripts. * * @return void */ public function enqueue_front_scripts() { } } } namespace WeDevs\Dokan\Analytics\Reports { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Dokan orders. * * @since 3.13.0 */ abstract class BaseQueryFilter implements \WeDevs\Dokan\Contracts\Hookable { protected $wc_table = 'wc_order_stats'; protected $context = ''; /** * Add join clause for Dokan order state table in WooCommerce analytics queries. * * @param array $clauses The existing join clauses. * * @return array The modified join clauses. */ public function add_join_subquery(array $clauses): array { } /** * Add where clause for Dokan order state in WooCommerce analytics queries. * * @param array $clauses The existing where clauses. * * @return array The modified where clauses. */ public function add_where_subquery(array $clauses): array { } /** * Add where clause for refunds in WooCommerce analytics queries. * * @param array $clauses The existing where clauses. * * @return array The modified where clauses. */ protected function add_where_subquery_for_refund(array $clauses): array { } /** * Determine if the query should be filtered by seller ID. * * @return bool True if the query should be filtered by seller ID, false otherwise. */ public function should_filter_by_vendor_id(): bool { } /** * Get the order types to include in WooCommerce analytics queries. * * @return string The order types to include. */ protected function get_order_and_refund_types_to_include(): string { } /** * Get the refund types to include in WooCommerce analytics queries. * * @return string The refund types to include. */ protected function get_refund_types_to_include(): string { } protected function get_dokan_table(): string { } /** * Get the non refund order types to include in WooCommerce analytics queries. * * @return string The refund types to include. */ protected function get_order_types_for_sql_excluding_refunds(): string { } /** * Add where clause for seller query filter in WooCommerce analytics queries. * * @param array $clauses The existing where clauses. * * @return array The modified where clauses. */ protected function add_where_subquery_for_vendor_filter(array $clauses): array { } /** * Get seller id from Query param for Admin and currently logged in user as Vendor * * @return int */ public function get_vendor_id() { } } /** * Seller analytics data filter. * * @since 3.14.7 */ class CacheKeyModifier implements \WeDevs\Dokan\Contracts\Hookable { /** * Setup analytics entities * * @since 3.14.7 * * WC apply filters from @see https://github.com/woocommerce/woocommerce/blob/be602de39d39878085e752f30ec1dabf16b0d642/plugins/woocommerce/src/Admin/API/Reports/GenericQuery.php#L77 * WC reports generation pattern @see https://github.com/woocommerce/woocommerce/blob/be602de39d39878085e752f30ec1dabf16b0d642/plugins/woocommerce/src/Admin/API/Reports/Products/Controller.php#L53 * * @return array */ protected function get_entities(): array { } /** * Register necessary hooks. * * @since 3.14.7 * * @return void */ public function register_hooks(): void { } /** * Apply seller filter to query arguments. * * Customize the WooCommerce analytics stats datastore to override the $total_query and $interval_query properties. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with WeDevs\Dokan\Analytics\Reports\WcSqlQuery * to apply specific filters to queries. * * @see https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/src/Admin/API/Reports * * @param array $args An array of query arguments. * * @return array Modified array of query arguments. */ public function apply_seller_filter(array $args): array { } /** * Check if report can be filtered. * * @param int $seller_id Seller ID. * * @since 3.14.7 * * @return bool */ protected function is_valid_seller_id(int $seller_id): bool { } } } namespace WeDevs\Dokan\Analytics\Reports\Categories { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Categories. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { protected $wc_table = 'wc_order_product_lookup'; /** * @var string The context of the query filter. */ protected $context = 'categories'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } } namespace WeDevs\Dokan\Analytics\Reports\Coupons { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Dokan orders. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { /** * @var string The context of the query filter. */ protected $context = 'coupons'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } /** * * Todo: We may remove this method after completing coupon amount sub-order distributions. * * Modify WooCommerce admin report columns for orders. * * @param array $column The existing columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name. * * @return array The modified columns. */ public function modify_admin_report_columns(array $column, string $context, string $wc_table_name): array { } } } namespace WeDevs\Dokan\Analytics\Reports\Coupons\Stats { /** * Class QueryFilter * * Extends the OrdersQueryFilter class to customize WooCommerce Analytics reports * for Dokan orders stats by adding additional subqueries and modifying report columns. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Coupons\QueryFilter { /** * The context for this query filter, used to differentiate between different report types. * * @var string */ protected $context = 'coupons_stats'; /** * Registers the necessary WordPress hooks to modify WooCommerce Analytics reports. * * @return void */ public function register_hooks(): void { } } /** * WC DataStore class to override the default handling of SQL clauses. * * @since 3.13.0 */ class WcDataStore extends \Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats\DataStore { /** * Override the $total_query and $interval_query properties to customize query behavior. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with * WeDevs\Dokan\Analytics\Reports\WcSqlQuery to apply specific filters to the queries. * The change is necessary because the "get_sql_clause" method's second parameter defaults to "unfiltered," * which prevents the filters required to add JOIN and WHERE clauses for the dokan_order_stats table. * * @return void */ protected function initialize_queries() { } } } namespace WeDevs\Dokan\Analytics\Reports\Customers { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Dokan orders. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { /** * @var string The context of the query filter. */ protected $context = 'customers'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } /** * * Modify WooCommerce admin report columns for orders. * * @param array $column The existing columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name. * * @return array The modified columns. */ public function modify_admin_report_columns(array $column, string $context, string $wc_table_name): array { } } } namespace WeDevs\Dokan\Analytics\Reports\Customers\Stats { /** * Class QueryFilter * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Customers\QueryFilter { protected $context = 'customers_stats'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } /** * * Modify WooCommerce admin report columns for orders. * * @param array $column The existing columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name. * * @return array The modified columns. */ public function add_select_subquery(array $wc_clauses): array { } protected function modify_select_field(string $field): string { } } } namespace WeDevs\Dokan\Analytics\Reports { /** * DataStoreCacheModifier class * * @since 4.0.0 */ class DataStoreCacheModifier implements \WeDevs\Dokan\Contracts\Hookable { /** * Setup analytics entities * * @since 4.0.0 * * @return array */ protected function get_entities(): array { } /** * Register hooks for modify vendor specific analytics data. * This method will be called automatically to register the hooks. * * @since 4.0.0 * * @return void */ public function register_hooks(): void { } /** * Add seller_id query param to the analytics query. * * @param array $params * * @return array */ public function add_query_param(array $params): array { } /** * Check if report can be filtered. * * @param int $seller_id Seller ID. * * @since 4.0.0 * * @return bool */ protected function is_valid_seller_id(int $seller_id): bool { } } /** * WC default data store modifier. * * @since 3.13.0 */ class DataStoreModifier implements \WeDevs\Dokan\Contracts\Hookable { /** * Register hooks for the data store modifier. * @inheritDoc * @since 3.13.0 * * @return void */ public function register_hooks(): void { } /** * Add Dokan column types to the WooCommerce reports. * * @since 4.2.8 * * @param array $column_types * @return array */ public function add_dokan_column_types($column_types) { } /** * Customize the WooCommerce products stats datastore to override the $total_query and $interval_query properties. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with WeDevs\Dokan\Analytics\Reports\WcSqlQuery * to apply specific filters to queries. * The reason for this change is that the "get_sql_clause" method's second parameter defaults to "unfiltered," which blocks the filters we need * to add JOIN and WHERE clauses for the dokan_order_stats table. * * @see https://github.com/woocommerce/woocommerce/blob/9297409c5a705d1cd0ae65ec9b058271bd90851e/plugins/woocommerce/src/Admin/API/Reports/Products/Stats/DataStore.php#L170 * * @param array $wc_stores An array of WooCommerce datastores. * @return array Modified array of WooCommerce datastores. */ public function modify_wc_products_stats_datastore($wc_stores) { } } /** * Class OrderType * * Defines constants and methods to handle different types of Dokan orders and refunds. * * @since 3.13.0 */ class OrderType { // Order type constants public const DOKAN_PARENT_ORDER = 0; public const DOKAN_SINGLE_ORDER = 1; public const DOKAN_SUBORDER = 2; public const DOKAN_PARENT_ORDER_REFUND = 3; public const DOKAN_SUBORDER_REFUND = 4; public const DOKAN_SINGLE_ORDER_REFUND = 5; public const DOKAN_ADVERTISEMENT_PRODUCT_ORDER = 6; public const DOKAN_ADVERTISEMENT_REFUND_ORDER = 7; public const DOKAN_SUBSCRIPTION_ORDER = 8; public const DOKAN_SUBSCRIPTION_REFUND_ORDER = 9; /** * Checks if the given order is related to a Dokan suborder. * * @param \WC_Abstract_Order $order The order object to check. * * @return bool True if the order is a Dokan suborder or related to one, false otherwise. */ public function is_dokan_suborder_related(\WC_Abstract_Order $order): bool { } /** * Determines the type of the given order based on its relation to Dokan suborders and refunds. * * @since 5.0.0 * * @param \WC_Abstract_Order $order The order object to classify. * * @return int The order type constant. */ public function get_type(\WC_Abstract_Order $order): int { } /** * Gets the special order type (advertisement or subscription) if applicable. * * This method applies a filter hook that allows external modules (like advertisement * or subscription modules) to determine the order type from their own context. * * @since 5.0.0 * * @param \WC_Abstract_Order $order The order object to check. * * @return int|null The special order type constant, or null if not a special order. */ protected function get_special_order_type(\WC_Abstract_Order $order): ?int { } /** * Gets the list of order types relevant to admin users. * * @return array List of admin order type constants. */ public function get_admin_order_types(): array { } /** * Gets the list of order types relevant to sellers. * * @return array List of seller order type constants. */ public function get_vendor_order_types(): array { } /** * Gets the list of order types (excluding refunds) relevant to admin users. * * @return array List of admin order type constants (non-refund). */ public function get_admin_order_types_excluding_refunds(): array { } /** * Gets the list of order types (excluding refunds) relevant to sellers. * * @return array List of seller order type constants (non-refund). */ public function get_vendor_order_types_excluding_refunds(): array { } /** * Gets the list of refund types relevant to all users. * * @return array List of refund type constants. */ public function get_refund_types(): array { } /** * Gets the list of refund types relevant to sellers. * * @return array List of seller refund type constants. */ public function get_vendor_refund_types(): array { } /** * Gets the list of refund types relevant to admin users. * * @return array List of admin refund type constants. */ public function get_admin_refund_types(): array { } /** * Gets the list of all order types. * * @return array List of all order type constants. */ public function get_all_order_types(): array { } /** * Gets the list of order types relevant to admin earnings. * * @since 5.0.0 * * @return array */ public function get_admin_earning_order_types(): array { } /** * Determines if the given order is of a type relevant to admin users. * * @since 5.0.0 * * @param \WC_Abstract_Order $order The order object to check. * * @return bool True if the order type is relevant to admin users, false otherwise. */ public function is_admin_order_type(\WC_Abstract_Order $order): bool { } } } namespace WeDevs\Dokan\Analytics\Reports\Orders { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Dokan orders. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { /** * @var string The context of the query filter. */ protected $context = 'orders'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } /** * Modify WooCommerce admin report columns for orders. * * @param array $column The existing columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name. * * @return array The modified columns. */ public function modify_admin_report_columns(array $column, string $context, string $wc_table_name): array { } /** * Exclude order IDs from WooCommerce analytics queries based on seller or admin context. * * @param array $ids The existing excluded order IDs. * @param array $query_args The query arguments. * @param string $field The field being queried. * @param string $context The context of the query. * * @return array The modified excluded order IDs. */ public function exclude_order_ids(array $ids, array $query_args, string $field, $context): array { } /** * Add custom columns to the select clause of WooCommerce analytics queries. * * @param array $clauses The existing select clauses. * * @return array The modified select clauses. */ public function add_select_subquery(array $clauses): array { } } } namespace WeDevs\Dokan\Analytics\Reports\Orders\Stats { /** * Dokan Orders stats data synchronizer. * * @since 3.13.0 */ class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface { /** * Max allowed Attemption to create table. */ const MAX_ATTEMPT = 2; /** * Attemption count to create order table if DB throws error. * * @var integer */ protected static $attempt_count = 0; /** * Table used to get the data. * * @var string */ protected static $table_name = 'dokan_order_stats'; /** * Cron event name. */ const CRON_EVENT = 'wc_order_stats_update'; /** * Cache identifier. * * @var string */ protected $cache_key = 'dokan_orders_stats'; /** * Data store context used to pass to filters. * * @var string */ protected $context = 'dokan_orders_stats'; /** * Dynamically sets the date column name based on configuration */ public function __construct() { } /** * Get the data based on args. * * @param array $args Query parameters. * @return stdClass|WP_Error */ public function get_data($args) { } /** * Add order information to the lookup table when orders are created or modified. * * @param int $post_id Post ID. * @return int|bool Returns -1 if order won't be processed, or a boolean indicating processing success. */ public static function sync_order($post_id) { } /** * Update the database with stats data. * * @param \WC_Order|\WC_Order_Refund $order Order or refund to update row for. * @return int|bool Returns -1 if order won't be processed, or a boolean indicating processing success. */ public static function update($order) { } /** * Deletes the order stats when an order is deleted. * * @param int $post_id Post ID. */ public static function delete_order($post_id) { } /** * Gets the vendor ID associated with an order. * * @param \WC_Order $order Order object. * * @return int Vendor ID. */ protected static function get_vendor_id_from_order($order) { } } /** * Class QueryFilter * * Extends the OrdersQueryFilter class to customize WooCommerce Analytics reports * for Dokan orders stats by adding additional subqueries and modifying report columns. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Orders\QueryFilter { /** * The context for this query filter, used to differentiate between different report types. * * @var string */ protected $context = 'orders_stats'; /** * Registers the necessary WordPress hooks to modify WooCommerce Analytics reports. * * @return void */ public function register_hooks(): void { } /** * Modifies the admin report columns to include Dokan-specific data. * * @since 4.0.0 * * @param array $column The existing report columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name being queried. * * @return array Modified report columns. */ public function modify_admin_report_columns(array $column, string $context, string $wc_table_name): array { } /** * Adds custom select subqueries for calculating Dokan-specific totals in the analytics reports. * * @since 4.0.0 * * @param array $clauses The existing SQL select clauses. * * @return array Modified SQL select clauses. */ public function add_select_subquery_for_total($clauses) { } } /** * Class ScheduleListener * * Listens to WooCommerce schedule events and triggers Dokan order synchronization and deletion. * * @since 3.13.0 */ class ScheduleListener implements \WeDevs\Dokan\Contracts\Hookable { /** * ScheduleListener constructor. * Registers the hooks on instantiation. */ public function __construct() { } /** * Register hooks for WooCommerce analytics order events. * * @return void */ public function register_hooks(): void { } /** * Sync Dokan order data when WooCommerce analytics updates order stats. * * @param int $order_id The ID of the order being updated. * * @return void */ public function sync_dokan_order($order_id) { } /** * Delete Dokan order data when WooCommerce deletes an order. * * @param int $order_id The ID of the order being deleted. * * @return void */ public function delete_order($order_id) { } } /** * DataStore class to override the default handling of WC SQL clauses. * * @since 3.13.0 */ class WcDataStore extends \Automattic\WooCommerce\Admin\API\Reports\Orders\Stats\DataStore { /** * Override the $total_query and $interval_query properties to customize query behavior. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with * WeDevs\Dokan\Analytics\Reports\WcSqlQuery to apply specific filters to the queries. * The change is necessary because the "get_sql_clause" method's second parameter defaults to "unfiltered," * which prevents the filters required to add JOIN and WHERE clauses for the dokan_order_stats table. * * @return void */ protected function initialize_queries() { } } } namespace WeDevs\Dokan\Analytics\Reports\Products { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Dokan Products. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { protected $wc_table = 'wc_order_product_lookup'; /** * @var string The context of the query filter. */ protected $context = 'products'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } } namespace WeDevs\Dokan\Analytics\Reports\Products\Stats { /** * Filters and modifies WooCommerce analytics queries for Dokan Products Stats. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Products\QueryFilter { protected $context = 'products_stats'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } /** * DataStore class to override the default handling of WC SQL clauses. * * @since 3.13.0 */ class WcDataStore extends \Automattic\WooCommerce\Admin\API\Reports\Products\Stats\DataStore { /** * Override the $total_query and $interval_query properties to customize query behavior. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with * WeDevs\Dokan\Analytics\Reports\WcSqlQuery to apply specific filters to the queries. * The change is necessary because the "get_sql_clause" method's second parameter defaults to "unfiltered," * which prevents the filters required to add JOIN and WHERE clauses for the dokan_order_stats table. * * @return void */ protected function initialize_queries() { } } } namespace WeDevs\Dokan\Analytics\Reports\Stock { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Product Stock. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { protected $should_removed_where_filter = true; public function register_hooks(): void { } /** * Undocumented function * * @param [type] $result * @param [type] $server * @param WP_REST_Request $request * @return mixed */ public function check_wc_analytics_reports_stock_path($result, $server, $request) { } /** * Apply seller ID query param to where SQL Clause. * * @param WP_Query $wp_query * @return array */ public function add_author_clause($args, $wp_query) { } } } namespace WeDevs\Dokan\Analytics\Reports\Stock\Stats { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Stock Stats. * * @since 3.13.0 */ class WcDataStore extends \Automattic\WooCommerce\Admin\API\Reports\Stock\Stats\DataStore { /** * Get stock counts for the whole store. * * @param array $query Not used for the stock stats data store, but needed for the interface. * @return array Array of counts. */ public function get_data($query) { } /** * Get low stock count (products with stock < low stock amount, but greater than no stock amount). * * @phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared * * * @return int Low stock count. */ protected function get_low_stock_count() { } /** * Get count for the passed in stock status. * * @param string $status Status slug. * @return int Count. */ protected function get_count($status) { } /** * Get product count for the store. * * @return int Product count. */ protected function get_product_count() { } protected function get_vendor_id(): int { } protected function get_vendor_where_query() { } } } namespace WeDevs\Dokan\Analytics\Reports\Taxes { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Taxes. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { protected $wc_table = 'wc_order_tax_lookup'; /** * @var string The context of the query filter. */ protected $context = 'taxes'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } } namespace WeDevs\Dokan\Analytics\Reports\Taxes\Stats { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for Tax Stats. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Taxes\QueryFilter { protected $context = 'taxes_stats'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } /** * Modifies the admin report columns to include Dokan-specific data. * * @param array $column The existing report columns. * @param string $context The context of the report. * @param string $wc_table_name The WooCommerce table name being queried. * * @return array Modified report columns. */ public function modify_admin_report_columns(array $column, string $context, string $wc_table_name): array { } } /** * WC DataStore class to override the default handling of SQL clauses. * * @since 3.13.0 */ class WcDataStore extends \Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats\DataStore { /** * Override the $total_query and $interval_query properties to customize query behavior. * This modification replaces the Automattic\WooCommerce\Admin\API\Reports\SqlQuery class with * WeDevs\Dokan\Analytics\Reports\WcSqlQuery to apply specific filters to the queries. * The change is necessary because the "get_sql_clause" method's second parameter defaults to "unfiltered," * which prevents the filters required to add JOIN and WHERE clauses for the dokan_order_stats table. * * @return void */ protected function initialize_queries() { } } } namespace WeDevs\Dokan\Analytics\Reports\Variations { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for variations. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\BaseQueryFilter { protected $wc_table = 'wc_order_product_lookup'; /** * @var string The context of the query filter. */ protected $context = 'variations'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } } namespace WeDevs\Dokan\Analytics\Reports\Variations\Stats { /** * Class QueryFilter * * Filters and modifies WooCommerce analytics queries for variations. * * @since 3.13.0 */ class QueryFilter extends \WeDevs\Dokan\Analytics\Reports\Variations\QueryFilter { protected $context = 'variations_stats'; /** * Register hooks for filtering WooCommerce analytics queries. * * @return void */ public function register_hooks(): void { } } } namespace WeDevs\Dokan\Analytics\Reports { /** * WC SqlQuery class to override the default handling of SQL clauses. * * @since 3.13.0 */ class WcSqlQuery extends \Automattic\WooCommerce\Admin\API\Reports\SqlQuery { /** * Update the default value of $handling from "unfiltered" to an empty string, * allowing filters to be applied to the SQL clauses. * * @param string $type Type of SQL clause (e.g., SELECT, WHERE). * @param string $handling Optional. The handling mode for the clause. Defaults to an empty string. * @return string The SQL clause. */ protected function get_sql_clause($type, $handling = 'filtered') { } } } namespace WeDevs\Dokan\Analytics { /** * Load the settings for the vendor analytics reports. */ class Settings implements \WeDevs\Dokan\Contracts\Hookable { /** * @inheritDoc */ public function register_hooks(): void { } /** * Get the analytics settings for the vendor dashboard. * * @param array $settings * @return array */ public function get_settings(array $settings): array { } /** * Get the analytics data endpoints. * * @return array */ protected function load_data_endpoints(): array { } } class VendorDashboardManager implements \WeDevs\Dokan\Contracts\Hookable { public function register_hooks(): void { } /** * Add a dummy content to the dashboard. * * @since 4.0.0 * * @return void */ public function add_dashboard_content() { } public function woocommerce_rest_check_permissions($permission, $context, $int_val, $obj) { } public function add_option_check_permissions(array $permission, \WP_REST_Request $request) { } /** * Filter product query by the Vendor. * * @param array $args * @return array */ public function product_query_args(array $args, \WP_REST_Request $request) { } public function add_additional_fields_schema1($reports) { } public function revenue_stats_schema($reports) { } public function sort_performance_indicators($reports) { } /** * Load analytics revenue schema vendor dashboard. * * @since 4.2.8 * * @see https://github.com/woocommerce/woocommerce/blob/8e3b0c45ad771d7fe53ee610f237f4803f1a63bb/plugins/woocommerce/src/Internal/Admin/Analytics.php#L113 * * @param array $endpoints Array of preloaded endpoints. * * @return array */ public function add_preload_endpoints(array $endpoints): array { } } } namespace WeDevs\Dokan { class Assets { /** * The constructor */ public function __construct() { } public static function get_wc_handler($handler): string { } /** * Load global admin and promo notices scripts * * @since 3.3.6 * * @return void */ public function load_dokan_admin_notices_scripts() { } /** * Enqueue admin scripts */ public function enqueue_admin_scripts($hook) { } /** * Load admin product localize data. * * @since 3.7.1 * * @return array */ public function admin_product_localize_scripts() { } /** * Add product listing data to the dokanFrontend localized object. * * @since 5.0.0 * * @param array $args Existing localized args. * @return array */ public function add_product_listing_localized_args(array $args): array { } public function get_localized_price() { } /** * SPA Routes * * @return array */ public function get_vue_admin_routes() { } public function get_vue_frontend_routes() { } /** * Register all Dokan scripts and styles */ public function register_all_scripts() { } /** * Get registered styles * * @return array */ public function get_styles() { } /** * Get all registered scripts * * @return array */ public function get_scripts() { } /** * Registers WooCommerce Admin scripts for the React-based Dokan Vendor dashboard. * * This function ensures that the necessary WooCommerce Admin assets are registered * for use in the Dokan Vendor dashboard. It temporarily suppresses "doing it wrong" * warnings during the registration process. * * @return void */ public function register_wc_admin_scripts() { } /** * Disable "doing it wrong" error * * @return bool */ public function desable_doing_it_wrong_error() { } /** * Enqueue front-end scripts */ public function enqueue_front_scripts() { } /** * Enqueue Dokan Helper Script * * @since 3.2.7 */ public function load_dokan_global_scripts() { } /** * Load form validate script args * * @since 2.5.3 */ public static function load_form_validate_script() { } /** * Load Dokan Dashboard Scripts * * @since 2.5.3 * * @global $wp */ public function dokan_dashboard_scripts() { } /** * Load google map script * * @since 2.5.3 */ public function load_gmap_script() { } /** * Filter 'dokan' localize script's arguments * * @since 2.5.3 * * @param array $default_args * * @return $default_args */ public function conditional_localized_args($default_args) { } /** * Get file prefix * * @return string */ public function get_prefix() { } /** * Register scripts * * @param array $scripts * * @return void */ public function register_scripts($scripts) { } /** * Register styles * * @param array $styles * * @return void */ public function register_styles($styles) { } /** * Enqueue the scripts * * @param array $scripts * * @return void */ public function enqueue_scripts($scripts) { } /** * Enqueue styles * * @param array $styles * * @return void */ public function enqueue_styles($styles) { } /** * Admin localized scripts * * @since 3.0.0 * * @return array */ public function get_admin_localized_scripts() { } /** * Admin vue localized scripts * * @since 3.14.0 * * @return array */ private function get_vue_admin_localized_scripts() { } /** * Get order listing statuses for the frontend. * * Reuses the same filter logic as dokan_order_listing_status_filter() so that * the React-based order list respects excluded and custom statuses. * * @since 5.0.0 * * @return array */ private function get_order_listing_statuses(): array { } } } namespace WeDevs\Dokan\BackgroundProcess { /** * Background Process Manager Class. * * @since 3.7.10 * * @property ChangeVendorProductStatus $change_vendor_product_status Instance of WeDevs\Dokan\Vendor\ChangeProductStatus class */ class Manager { use \Wedevs\Dokan\Traits\ChainableContainer; /** * Class constructor. */ public function __construct() { } /** * Initialize classes to chainable container. * * @since 3.7.10 * * @return void */ public function init_classes() { } /** * Initialize hooks. * * @since 3.7.10 * * @return void */ public function init_hooks() { } /** * Show variable products author updated notice. * * @since 3.7.10 * * @param array $notices * * @return array $notices */ public function show_variable_products_author_updated_notice($notices) { } } /** * RewriteVariableProductsAuthor Class. * * @since 3.7.10 */ class RewriteVariableProductsAuthor extends \WC_Background_Process { /** * Initiate new background process. */ public function __construct() { } /** * Dispatch updater. * * Updater will still run via cron job if this fails for any reason. * * @since 3.7.10 * * @return void */ public function dispatch() { } /** * Perform updates. * * @since 3.7.10 * * @param array $args * * @return bool|array */ public function task($args) { } /** * Rewrite variable product variations author IDs. * * @since 3.7.10 * * @param int $page * * @return bool|array */ protected function rewrite_variable_product_variations_author_ids($page = 1) { } /** * Complete the process. * * @since 3.7.10 * * @return void */ protected function complete() { } } } namespace WeDevs\Dokan\Blocks { /** * Dokan Block For Products. * * @since 3.7.10 */ class ProductBlock { /** * Get Product configurations. * * @since 3.7.10 * * @return array */ public function get_configurations() { } } } namespace WeDevs\Dokan\CLI { /** * Dokan WP-CLI command registry. * * Owns the `wp dokan` command namespace and exposes the `dokan_cli_commands` * filter so Dokan and its extensions (e.g. Dokan Pro) can register commands * under the same namespace from a single place. * * @since 5.0.18 */ class Manager { /** * Bootstraps the CLI command registry. * * @since 5.0.18 */ public function __construct() { } /** * Registers every Dokan WP-CLI command collected from the filter. * * @since 5.0.18 * * @return void */ public function register_commands() { } } } namespace WeDevs\Dokan { /** * Cache Helper class. * * Manage all of the caches of Dokan and handles it beautifully. * * @since 3.3.2 */ class Cache extends \WeDevs\Dokan\Abstracts\DokanCache { /** * Set Cache Group Prefix. * * @since 3.3.2 * * @param string $cache_group_prefix * * @return string */ protected static function get_cache_group_prefix() { } /** * Get Cache Key Prefix. * * @since 3.3.2 * * @return string */ protected static function get_cache_prefix() { } } /** * Cache Invalidate class. * * Handles all of the common caches. * * @since 3.3.2 */ class CacheInvalidate { /** * Constructor * * @since 3.3.2 */ public function __construct() { } /** * Invalidate comments cache group of the specific post type. * * @since 3.3.2 * * @param string $group * @param int $user_id * * @return void */ public function clear_comment_cache($post_type, $user_id) { } /** * Fires after new comment is being added. * * @since 3.3.2 * * @param int $comment_id * @param int|string $comment_approved * @param array $comment_data * * @return void */ public function comment_created($comment_id, $comment_approved, $comment_data) { } /** * Fires after comment is being updated. * * @since 3.3.2 * * @param int $comment_id * @param array $comment_data * * @return void */ public function comment_updated($comment_id, $comment_data) { } /** * Fires before a comment is being deleted. * * @since 3.3.2 * * @param int $comment_id * @param \WP_Comment $comment * * @return void */ public function comment_deleted($comment_id) { } /** * Fires after a comment status is being changed. * * @since 3.3.2 * * @param int $comment_id Comment ID. * @param string $comment_status Current comment status. Possible values include * 'hold', '0', 'approve', '1', 'spam', and 'trash'. * * @return void */ public function comment_status_change($comment_id, $comment_status) { } } } namespace WeDevs\Dokan\Captcha { /** * Captcha provider contract. */ interface ProviderInterface { /** Unique slug for this provider, e.g. 'google_recaptcha_v3' */ public function get_slug(): string; /** Human readable provider name */ public function get_label(): string; /** Whether this provider is ready to be used (enabled + has credentials) */ public function is_ready(): bool; /** * Register any needed assets (scripts/styles) and do any localization. * It should be safe to call multiple times. */ public function register_assets(): void; /** * Render the captcha field/widget markup for a given context. * Should return HTML string to be printed into forms. * * @param string $context Action/context key for the form, e.g. 'dokan_contact_seller_recaptcha' * @param array $args Extra arguments if needed. */ public function render_field_html(string $context, array $args = []): string; /** * Validate user response/token. * * @param string $context Action/context key used when rendering/executing the captcha * @param string $token Token or response from front-end * * @return bool True if valid, false otherwise */ public function validate(string $context, string $token): bool; /** * Provider-specific admin settings fields to be merged into the Appearance section. * Return an associative array of fields similar to Admin\Settings get_settings_fields structure. * * @return array Associative array keyed by setting field keys. */ public function get_admin_settings_fields(): array; } /** * Base captcha provider. * * Provides shared helpers such as option access and readiness caching for * concrete captcha providers. * * @since 4.3.0 */ abstract class AbstractProvider implements \WeDevs\Dokan\Captcha\ProviderInterface, \WeDevs\Dokan\Contracts\Hookable { /** Cached readiness */ protected ?bool $ready = null; /** Convenience: get option from dokan appearance */ protected function get_option(string $key, $default = '') { } /** * Whether this provider is ready to be used. * * Implements lazy cached readiness and delegates the actual check to * compute_readiness(). * * @return bool True if ready, false otherwise. */ public function is_ready(): bool { } /** * Compute provider readiness. * * Concrete providers must implement their own rules to decide whether they * are ready to operate (e.g., enabled plus required credentials provided). * * @return bool */ abstract protected function compute_readiness(): bool; /** * Register hooks for the provider. * * This method is responsible for registering the necessary hooks and actions * required for the provider's functionality. Default implementation is empty. * * @return void */ public function register_hooks(): void { } /** * Add the current provider to the list of providers. * * This method appends the current provider instance to the provided list of providers. * * @param array $providers The existing list of providers. * * @return array The updated list of providers with the current provider added. */ public function enlist(array $providers): array { } /** * Convert a truthy-ish value to boolean. * * @param mixed $value Value to evaluate. * * @return bool */ protected function to_bool($value): bool { } } /** * Captcha service manager. * * Central registry and facade for captcha providers. Handles provider selection, * asset registration, field rendering and server-side validation. Resolved via * Dokan DI container. * * @since 4.3.0 */ class Manager implements \WeDevs\Dokan\Contracts\Hookable { /** @var ProviderInterface[] */ protected array $providers = []; /** * Register WordPress hooks used by the captcha system. * * @return void */ public function register_hooks(): void { } /** * Resolve providers via filter and register them. * * @return void */ public function register_providers_from_filter(): void { } /** * Register a captcha provider instance. * * @param ProviderInterface $provider Provider instance implementing the contract. * * @return void */ public function register_provider(\WeDevs\Dokan\Captcha\ProviderInterface $provider): void { } /** Get active provider slug selected from settings */ public function get_active_provider_slug(): string { } /** Is captcha globally enabled? Falls back to provider-specific flag if global flag missing. */ public function is_enabled(): bool { } /** Return active provider instance, or null if not ready */ public function get_active_provider(): ?\WeDevs\Dokan\Captcha\ProviderInterface { } /** Enqueue/register assets for the active provider */ public function register_assets(): void { } /** Validate token for a context. */ public function validate(string $context, string $token): bool { } /** Render hidden/widget field for forms if needed */ public function render_field_html(string $context, array $args = []): string { } /** Echoes provider fields into contact form, keeping backward compatibility */ public function maybe_render_contact_form_field($seller_id): void { } /** * Render the captcha field on the registration form. * * Hooked to both `register_form` (Dokan vendor registration & onboarding templates) and * `woocommerce_register_form` (WooCommerce My Account registration). A static guard makes * sure the field is output only once per request, avoiding a duplicate token field/widget. * * @since 5.0.6 * * @return void */ public function maybe_render_registration_field(): void { } /** * Validate the captcha token submitted with a registration request. * * Hooked to `woocommerce_register_post`, which fires for every WooCommerce registration * after the registration nonce has already been verified upstream. Adds an error to the * registration error bag when verification fails, which aborts the registration. * * @since 5.0.6 * * @param string $username Submitted username. * @param string $email Submitted email. * @param \WP_Error $validation_errors Registration error bag. * * @return void */ public function validate_registration_captcha($username, $email, $validation_errors): void { } /** * Filter admin settings fields to append provider-specific settings under dokan_appearance. * * @param array $settings_fields Fields to be rendered in admin settings. * @param Settings $settings_instance Settings instance. * * @return array */ public function filter_settings_fields(array $settings_fields, $settings_instance): array { } /** Utility */ protected function to_bool($value): bool { } } } namespace WeDevs\Dokan\Captcha\Providers { /** * Cloudflare Turnstile provider implementation. * * Handles readiness, asset injection, field rendering, and server-side * verification against Cloudflare's Turnstile API. * * @since 4.3.0 */ class CloudflareTurnstileProvider extends \WeDevs\Dokan\Captcha\AbstractProvider { /** * Get the unique provider slug. * * @return string */ public function get_slug(): string { } /** * Get the human-readable provider name. * * @return string */ public function get_label(): string { } /** * Compute readiness based on enable flag and presence of credentials. * * @return bool */ protected function compute_readiness(): bool { } /** * Register and enqueue Turnstile API and helper script. * * @return void */ public function register_assets(): void { } /** * Render the Turnstile widget markup for a given context. * * @param string $context Action/context key. * @param array $args Optional arguments. * * @return string HTML markup to output in the form. */ public function render_field_html(string $context, array $args = []): string { } /** * Validate a Turnstile response token via Cloudflare verification API. * * @param string $context Context key (not used by Turnstile but kept for interface parity). * @param string $token Token returned by Turnstile widget. * * @return bool True if verification is successful, false otherwise. */ public function validate(string $context, string $token): bool { } /** * Provide Turnstile-related admin settings fields for Dokan Appearance. * * @return array */ public function get_admin_settings_fields(): array { } } /** * Google reCAPTCHA v3 provider implementation. * * Handles readiness, asset registration, field rendering, and server-side * verification against Google's reCAPTCHA v3 API. * * @since 4.3.0 */ class GoogleRecaptchaV3Provider extends \WeDevs\Dokan\Captcha\AbstractProvider { /** * Get the unique provider slug. * * @return string */ public function get_slug(): string { } /** * Get the human-readable provider name. * * @return string */ public function get_label(): string { } /** * Compute readiness based on enable flag and presence of credentials. * * @return bool */ protected function compute_readiness(): bool { } /** * Register and enqueue front-end assets needed for reCAPTCHA execution. * * @return void */ public function register_assets(): void { } /** * Render field HTML for a given context. * * For reCAPTCHA v3, no visible widget is required, so this returns an * empty string. The token is injected into an existing hidden field. * * @param string $context Action/context key. * @param array $args Optional arguments. * * @return string HTML markup. */ public function render_field_html(string $context, array $args = []): string { } /** * Validate a front-end token against Google's siteverify API. * * @param string $context Expected action name used during execute(). * @param string $token Token returned by reCAPTCHA. * * @return bool True on valid verification; false otherwise. */ public function validate(string $context, string $token): bool { } /** * Convert a truthy-ish value to boolean. * * @param mixed $value Value to evaluate. * * @return bool */ protected function to_bool($value): bool { } /** * Provider-specific admin settings fields to be merged into the Appearance section. * Return an associative array of fields similar to Admin\Settings get_settings_fields structure. * * @return array Associative array keyed by setting field keys. */ public function get_admin_settings_fields(): array { } } } namespace WeDevs\Dokan\CatalogMode\Admin { /** * Class Hooks * * This class will be responsible for admin settings of Catalog Mode feature * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode\Admin */ class Settings { /** * Class constructor * * @since 3.6.4 * * @return void */ public function __construct() { } /** * This method will register catalog mode settings section under Selling Options settings section * * @since 3.6.4 * * @param array $selling_options * * @return array */ public function admin_settings($selling_options) { } } } namespace WeDevs\Dokan\CatalogMode { /** * Class Controller * * This class will include all the related files required for Catalog Mode feature and will work as an entry point for * all the hooks. * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode */ class Controller { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.6.4 * * @return void */ public function __construct() { } /** * This method will load all the required files * * @since 3.6.4 * * @return void */ private function set_controllers() { } } } namespace WeDevs\Dokan\CatalogMode\Dashboard { /** * ProductBulkEdit class * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode\Dashboard */ class ProductBulkEdit { /** * Class Constructor * * @since 3.6.4 */ public function __construct() { } /** * Add bulk edit status. * * @since 3.6.4 * * @param array $bulk_statuses previous status. * * @return array */ public function bulk_product_catalog_options($bulk_statuses) { } /** * This method will enable/disable catalog mode feature for the selected products. * * @since 3.6.4 * * @return void */ public function save_bulk_edit_catalog_mode_data($status, $product_ids) { } /** * This method will display a message to the vendor if the product update was successful via bulk edit. * * @since 3.6.4 * * @param $type string * * @return void */ public function display_product_update_message($type) { } } /** * Class Hooks * * This class will load hooks related to frontend * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode */ class Products { /** * Class constructor * * @since 3.6.4 * * @return void */ public function __construct() { } /** * This method will render catalog mode section under single product edit page * * @since 3.6.4 * * @param $product_id int * * @return void */ public function render_product_section($product_id) { } /** * This method will save catalog mode section data * * @since 3.6.4 * * @param $product_id int * * @return void */ public function save_catalog_mode_data($product_id) { } } /** * Class Hooks * * This class will be responsible for admin settings of Catalog Mode feature * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode\Dashboard */ class Settings { /** * Class constructor * * @since 3.6.4 * * @return void */ public function __construct() { } /** * This method will render settings fields for Catalog Mode * * @since 3.6.4 * * @param array $store_settings * @param int $user_id * * @return void */ public function render_settings_fields($user_id, $store_settings) { } /** * This method will save settings fields for Catalog Mode * * @since 3.6.4 * * @param int $store_id * @param array $dokan_settings * * @return array */ public function save_settings_fields($dokan_settings, $store_id) { } } } namespace WeDevs\Dokan\CatalogMode { /** * Class Hooks * * This class will be responsible to include all the helper methods required for Catalog Mode feature. * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode */ class Helper { /** * Check if admin settings is enabled for catalog mode * * @since 3.6.4 * * @return bool */ public static function is_enabled_by_admin() { } /** * Check if hide price settings is enabled for admin * * @since 3.6.4 * * @return bool */ public static function hide_product_price_option_is_enabled_by_admin() { } /** * Check if hide add to cart settings is enabled for admin * * @since 3.6.4 * * @return bool */ public static function hide_add_to_cart_button_option_is_enabled_by_admin() { } /** * Check if admin settings is enabled for catalog mode * * @since 3.6.4 * * @return bool */ public static function is_enabled_by_vendor($vendor_id = 0) { } /** * Check if hide price settings is enabled for admin * * @since 3.6.4 * * @return bool */ public static function hide_product_price_option_is_enabled_by_vendor($vendor_id = 0) { } /** * Check if hide add to cart settings is enabled for admin * * @since 3.6.4 * * @return bool */ public static function hide_add_to_cart_button_option_is_enabled_by_vendor($vendor_id = 0) { } /** * This method will return catalog mode saved settings data for a vendor * * @since 3.6.4 * * @param int $vendor_id * * @return array */ public static function get_vendor_catalog_mode_settings($vendor_id = 0) { } /** * This method will return default settings for catalog mode * * @since 3.6.4 * * @return string[] */ public static function get_defaults() { } /** * This method will check if catalog mode data is set for a product. * * @since 3.6.4 * * @param $product int|\WC_Product * * @return bool */ public static function is_enabled_for_product($product) { } /** * This method will return catalog mode data for a product. * * @since 3.6.4 * * @param $product int|\WC_Product * * @return string[] */ public static function get_catalog_mode_data_by_product($product) { } } /** * Class Hooks * * This class will load hooks related to frontend * * @since 3.6.4 * * @package WeDevs\Dokan\CatalogMode */ class Hooks { /** * Class constructor * * @since 3.6.4 * * @return void */ public function __construct() { } /** * This method will hide add to cart button for products if enabled by vendor * * @since 3.6.4 * * @param $purchasable bool * @param $product \WC_Product * * @return bool */ public function hide_add_to_cart_button($purchasable, $product) { } /** * This method will hide product price if enabled by vendor * * @since 3.6.4 * * @param $price * @param $product * * @return string */ public function hide_product_price($price, $product) { } } } namespace WeDevs\Dokan { /** * Dokan Commission Class * * @since 2.9.21 */ class Commission { /** * Order id holder * * @since 2.9.21 * * @var integer */ public $order_id = 0; /** * Order Line Item Id For Product * * @since 3.8.0 * * @var int $order_item_id */ protected $order_item_id = 0; /** * Order quantity holder * * @since 2.9.21 * * @var integer */ public $quantity = 0; /** * Calculate gateway fee * * @deprecated 3.14.0 Use dokan()->fees->calculate_gateway_fee insted. * * @since 2.9.21 * * @param int $order_id * * @return void */ public function calculate_gateway_fee($order_id) { } /** * Set order id * * @deprecated 3.14.0 * * @since 2.9.21 * * @param int $id * * @return void */ public function set_order_id($id) { } /** * Set order line item id * * @deprecated 3.14.0 * * @since 3.8.0 * * @param int $item_id * * @return void */ public function set_order_item_id($item_id) { } /** * Get order id * * @deprecated 3.14.0 * * @since 2.9.21 * * @return int */ public function get_order_id() { } /** * Get order line item id * * @deprecated 3.14.0 * * @since 3.8.0 * * @return int */ public function get_order_item_id() { } /** * Set order quantity * * @deprecated 3.14.0 * * @since 2.9.21 * * @param int $number * * @return void */ public function set_order_qunatity($number) { } /** * Get order quantity * * @deprecated 3.14.0 * * @since 2.9.21 * * @return int */ public function get_order_qunatity() { } /** * Get earning by product * * @since 2.9.21 * * @param int|WC_Product $product * @param string $context [admin|seller] * @param float|null $price * * @return float|WP_Error */ public function get_earning_by_product($product, $context = 'seller', $price = null) { } /** * Get earning by order * * @since 2.9.21 * @since 3.7.19 Shipping tax recipient support added. * * @param int|WC_Order $order Order. * @param string $context Accepted values are `admin`, `seller` * * @return float|void|WP_Error|null on failure */ public function get_earning_by_order($order, $context = 'seller') { } /* * Get vendor earning sub-total * * @param int|WC_Order $order Order. * * @since 4.1.3 * * @return float|int */ public function get_vendor_earning_subtotal_by_order($order) { } /** * Validate commission rate * * @since 2.9.21 * * @param float $rate * * @return float */ public function validate_rate($rate) { } /** * Get vendor wise additional rate * * @deprecated 3.14.0 Use dokan()->vendor->get( $vendor_id )->get_commission_settings()->get_percentage() insted * * @since 2.9.21 * * @param int $vendor_id * * @return float|null on failure */ public function get_vendor_wise_rate($vendor_id) { } /** * Get vendor wise additional fee * * @deprecated 3.14.0 Use dokan()->vendor->get( $vendor_id )->get_commission_settings()->get_flat() instead * * @since 2.9.21 * * @param int $vendor_id * * @return float|null on failure */ public function get_vendor_wise_additional_fee($vendor_id) { } /** * Get vendor wise additional type * * @deprecated 3.14.0 Use dokan()->vendor->get( $vendor_id )->get_commission_settings()->get_type() instead * * @since 2.9.21 * * @param int $vendor_id * * @return float|null on failure */ public function get_vendor_wise_type($vendor_id) { } /** * Get earning from order table * * @since 2.9.21 * * @param int $order_id * @param string $context * @param bool $raw * * @return float|array|null on failure */ public function get_earning_from_order_table($order_id, $context = 'seller', $raw = false) { } /** * Get shipping fee recipient * * @deprecated 3.14.0 Use dokan()->fees->get_shipping_fee_recipient() instead * * @since 2.9.21 * @since 3.4.1 introduced the shipping fee recipient hook * * @param WC_Order|int $order * * @return string */ public function get_shipping_fee_recipient($order) { } /** * Get tax fee recipient * * @deprecated 3.14.0 Use dokan()->fees->get_tax_fee_recipient() instead * * @since 2.9.21 * @since 3.4.1 introduced the tax fee recipient hook * * @param WC_Order|int $order * * @return string|WP_Error */ public function get_tax_fee_recipient($order) { } /** * Get shipping tax fee recipient. * * @deprecated 3.14.0 Use dokan()->fees->get_shipping_tax_fee_recipient() instead * * @since 3.7.19 * * @param WC_Order $order Order. * * @return string */ public function get_shipping_tax_fee_recipient($order): string { } /** * Get total shipping tax refunded for the order. * * @deprecated 3.14.0 Use dokan()->fees->get_total_shipping_tax_refunded() instead * * @since 3.7.19 * * @param WC_Order $order Order. * * @return float */ public function get_total_shipping_tax_refunded(\WC_Order $order): float { } /** * Get processing fee * * @deprecated 3.14.0 Use dokan()->fees->get_processing_fee instead. * * @since 3.0.4 * * @param WC_Order $order * * @return float */ public function get_processing_fee($order) { } /** * Get all the orders to be processed * * @since 3.0.4 * * @param WC_Order $order * * @return WC_Order[] */ public function get_all_order_to_be_processed($order) { } /** * Calculate commission (commission priority [1.product, 2.category, 3.vendor, 4.global] wise) * I this function the calculation was written for vendor perspective it is deprecated now it is recomanded to use `get_commission` method it works fo admin perspective. * * @deprecated 3.14.0 Use get_commission() instead. * * @since 2.9.21 * * @param int $product_id * @param float $product_price * @param int $vendor_id * * @return float */ public function calculate_commission($product_id, $product_price, $vendor_id = null) { } /** * Returns all the commission types that ware in dokan. These types were existed before dokan lite version 3.14.0 * * @since 3.14.0 * * @return array */ public function get_legacy_commission_types() { } /** * Returns commission (commission priority [1.Order item if exists. 2.product, 3.vendor, 4.global] wise) * * @since 3.14.0 * * @param array $args { * Accepted arguments are below. * * @type int $order_item_id Order item id. Default ''. Accepted values numbers. * @type float|int $total_amount The amount on which the commission will be calculated. Default 0. Accepted values numbers. * Ff you want to calculate for order line item the $total_amount should be total line item amount and * $total_quantity should be total line item quantity. EX: for product item apple with cost $100 then $total_amount = 500, $total_quantity = 5 * or if you want to calculate for product price the $total_amount should be the product price and $total_quantity should be 1 * EX: for product apple with cost $100 then $total_amount = 100, $total_quantity = 1 * @type int $total_quantity This is the total quantity that represents the $total_amounts item units. Default 1. Accepted values numbers. * Please read $total_amount doc above to understand clearly. * @type int $product_id Product id. Default 0. Accepted values numbers. * @type int $vendor_id Vendor id. Default ''. Accepted values numbers. * @type int $category_id Product category id. Default 0'. Accepted values numbers. * } * @param boolean $auto_save If true, it will save the calculated commission automatically to the given `$order_item_id`. Default 'false`. Accepted values boolean. * @param boolean $override_total_amount_by_product_price If true, it will override the `$total_amount` by the product price if the `$total_amount` is empty and `$order_item_id` is empty. Default 'true`. Accepted values boolean. * * @return \WeDevs\Dokan\Commission\Model\Commission */ public function get_commission($args = [], $auto_save = false, $override_total_amount_by_product_price = true) { } } } namespace WeDevs\Dokan\Commission\Contracts { /** * Interface CommissionInterface * * Handles the calculation of commissions, earnings, discounts, shipping, and gateway fees * for both admin and vendor in a marketplace environment. */ interface CommissionInterface { /** * Get the discount amount provided by the admin. * * @return float */ public function get_admin_discount(): float; /** * Get the discount amount provided by the vendor. * * @return float */ public function get_vendor_discount(): float; /** * Calculate the admin's net commission. * Formula: (product price - vendor discount %) * admin commission % - admin discount * * @return float */ public function get_admin_net_commission(): float; /** * Calculate the vendor's net earning. * Formula: order_item_total - admin_net_commission * * @return float */ public function get_vendor_net_earning(): float; /** * Get the admin's net earning from admin-type orders. * * @since 5.0.0 * * @return float */ public function get_admin_net_earning(): float; /** * Get the admin commission. * Returns the admin net commission when positive, otherwise zero. * * @return float */ public function get_admin_commission(): float; /** * Calculate the vendor's total earning. * Formula: vendor_net_earning + vendor_shipping_fee - vendor_gateway_fee * * @return float */ public function get_vendor_earning(): float; /** * Calculate the admin subsidy. * Returns the absolute value of admin net commission when negative, otherwise zero. * * @return float */ public function get_admin_subsidy(): float; } } namespace WeDevs\Dokan\Commission\Model { class Commission implements \WeDevs\Dokan\Commission\Contracts\CommissionInterface { /** * Admin's net commission amount. * * @var float */ protected float $admin_net_commission; /** * Admin's net earning from admin-type orders (subscriptions, advertisements, etc.). * * @var float */ protected float $admin_net_earning; /** * Vendor Earning without subsidy. * * @var float */ protected float $vendor_net_earning; protected float $admin_discount; protected float $vendor_discount; protected \WeDevs\Dokan\Commission\Model\Setting $settings; /** * Constructor to initialize the Commission object. * * @param Setting $settings The commission settings. */ public function set_settings(\WeDevs\Dokan\Commission\Model\Setting $settings): self { } public function get_settings(): \WeDevs\Dokan\Commission\Model\Setting { } /** * Set the admin's net commission. * * @param float $admin_net_commission The net commission amount for the admin. * @return self */ public function set_admin_net_commission(float $admin_net_commission): self { } /** * Get the admin's net commission. * * @return float The net commission amount for the admin. */ public function get_admin_net_commission(): float { } /** * Set the admin's net earning. * * @since 5.0.0 * * @param float $admin_net_earning The net earning amount for the admin. * * @return Commission */ public function set_admin_net_earning(float $admin_net_earning): self { } /** * Get the admin's net earning. * * @since 5.0.0 * * @return float The net earning amount for the admin. */ public function get_admin_net_earning(): float { } /** * Set the vendor's net earning. * * @param float $vendor_earning The earning amount for the vendor. * * @return self */ public function set_vendor_net_earning(float $vendor_earning): self { } /** * Get the vendor's net earning. * * @return float The net earning amount for the vendor. */ public function get_vendor_net_earning(): float { } /** * Set the admin's discount. * * @param float $admin_discount The discount amount for the admin. * @return self */ public function set_admin_discount(float $admin_discount): self { } /** * Get the admin's discount. * * @return float The discount amount for the admin. */ public function get_admin_discount(): float { } /** * Set the vendor's discount. * * @param float $vendor_discount The discount amount for the vendor. * @return self */ public function set_vendor_discount(float $vendor_discount): self { } /** * Get the vendor's discount. * * @return float The discount amount for the vendor. */ public function get_vendor_discount(): float { } public function get_vendor_earning(): float { } public function get_admin_commission(): float { } public function get_admin_subsidy(): float { } /** * Get the commission type. * * @since 4.0.2 * * @return string The commission type. */ public function get_type(): string { } } } namespace WeDevs\Dokan\Commission { abstract class AbstractCommissionCalculator extends \WeDevs\Dokan\Commission\Model\Commission { protected \WeDevs\Dokan\Commission\Model\Setting $settings; /** * @var bool $should_adjust_refund */ protected bool $should_adjust_refund = true; /** * Returns the applied strategy. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Model\Commission */ abstract public function calculate(): \WeDevs\Dokan\Commission\Model\Commission; /** * Retrieve commission data from order item meta. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Model\Commission */ abstract public function get(): \WeDevs\Dokan\Commission\Model\Commission; public function set_should_adjust_refund(bool $should_adjust_refund): self { } public function get_should_adjust_refund(): bool { } } class Calculator extends \WeDevs\Dokan\Commission\AbstractCommissionCalculator { protected float $subtotal = 0.0; protected float $total = 0.0; protected int $quantity = 0; protected \WeDevs\Dokan\Commission\Model\Setting $settings; protected ?\WeDevs\Dokan\Commission\CouponInfo $discount; /** * @return float */ public function get_subtotal(): float { } /** * @param float $subtotal * * @return Calculator */ public function set_subtotal(float $subtotal): \WeDevs\Dokan\Commission\Calculator { } /** * @return float */ public function get_total(): float { } /** * @param float $total * * @return Calculator */ public function set_total(float $total): \WeDevs\Dokan\Commission\Calculator { } /** * @return int */ public function get_quantity(): int { } /** * @param int $quantity * * @return Calculator */ public function set_quantity(int $quantity): \WeDevs\Dokan\Commission\Calculator { } /** * @return Setting */ public function get_settings(): \WeDevs\Dokan\Commission\Model\Setting { } /** * @param Setting $settings * * @return Calculator */ public function set_settings(\WeDevs\Dokan\Commission\Model\Setting $settings): \WeDevs\Dokan\Commission\Calculator { } /** * @return mixed */ public function get_discount(): \WeDevs\Dokan\Commission\CouponInfo { } /** * @param CouponInfo $discount * * @return Calculator */ public function set_discount(\WeDevs\Dokan\Commission\CouponInfo $discount): \WeDevs\Dokan\Commission\Calculator { } /** * Calculates the commission based on discounts and settings. * * @return Commission */ public function calculate(): \WeDevs\Dokan\Commission\Model\Commission { } /** * Calculates the raw admin commission before capping. * * @param float $net_amount_with_admin_discount Amount after vendor discount. * @param float $vendor_discount Discount given by vendor. * @param float $admin_discount Discount given by admin. * @return float */ private function calculate_raw_admin_commission(): float { } /** * Creates the commission object with all related values. * * @param float $admin_commission Final admin commission. * @param float $vendor_discount Vendor's discount. * @param float $vendor_earning Vendor's earning. * @param float $admin_discount Admin's discount. * @return Commission */ private function create_commission(float $admin_commission, float $vendor_earning): \WeDevs\Dokan\Commission\Model\Commission { } /** * @inheritDoc */ public function get(): \WeDevs\Dokan\Commission\Model\Commission { } /** * Calculate vendor and admin earnings after a refund. * * @param float $vendor_earning Original vendor earning. * @param float $admin_commission Original admin commission. * @param float $item_total Original item total (excluding tax/shipping). * @param float $refund_amount Refunded amount for the item. * * @return Commission */ public function calculate_for_refund(float $vendor_earning, float $admin_commission, float $item_total, float $refund_amount): \WeDevs\Dokan\Commission\Model\Commission { } } } namespace WeDevs\Dokan\Commission\Contracts { /** * Interface CommissionInterface * * Handles the calculation of commissions, earnings, discounts, shipping, and gateway fees * for both admin and vendor in a marketplace environment. */ interface OrderCommissionInterface extends \WeDevs\Dokan\Commission\Contracts\CommissionInterface { /** * Get the shipping fee amount that belongs to the admin. * * @return float */ public function get_admin_shipping_fee(): float; /** * Get the shipping fee amount that belongs to the vendor. * * @return float */ public function get_vendor_shipping_fee(): float; /** * Get the gateway fee paid by the admin. * * @return float */ public function get_admin_gateway_fee(): float; /** * Get the gateway fee paid by the vendor. * * @return float */ public function get_vendor_gateway_fee(): float; } } namespace WeDevs\Dokan\Commission { class CouponInfo { protected array $info = []; protected ?float $vendor_discount; protected ?float $admin_discount; public function __construct(array $info) { } /** * @param array $info * * @return CouponInfo */ public function set_info(array $info): \WeDevs\Dokan\Commission\CouponInfo { } protected function populate() { } /** * @return float|null */ public function get_vendor_discount(): ?float { } /** * @return float|null */ public function get_total_discount(): ?float { } /** * @return float|null */ public function get_admin_discount(): ?float { } /** * Get the admin and vendor discount amount from a single coupon. * * @param array $coupon_info * @return array */ protected function get_coupon_amount(array $coupon_info): array { } } } namespace WeDevs\Dokan\Commission\Formula { /** * Interface class for commission calculator. * Extend this class to make a commission calculator. * * @since 3.14.0 */ abstract class AbstractFormula { /** * Commission setting. * * @since 3.14.0 * * @var \WeDevs\Dokan\Commission\Model\Setting $settings */ protected \WeDevs\Dokan\Commission\Model\Setting $settings; protected float $percent; protected float $fixed = 0; protected float $combinedFixed = 0; abstract public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings); } /** * Category based commission calculator class. * * @since 3.14.0 */ class CategoryBased extends \WeDevs\Dokan\Commission\Formula\AbstractFormula { /** * Commission type source. * * @since 3.14.0 */ const SOURCE = 'category_based'; /** * Admin commission amount. * * @since 3.14.0 * * @var int|float $admin_commission */ protected $admin_commission = 0; /** * Per item admin commission amount. * * @since 3.14.0 * * @var int|float $per_item_admin_commission */ protected $per_item_admin_commission = 0; /** * Total vendor earning amount. * * @since 3.14.0 * * @var int|float $vendor_earning */ protected $vendor_earning = 0; /** * Total items quantity, on it the commission will be calculated. * * @since 3.14.0 * * @var int $items_total_quantity */ protected $items_total_quantity = 1; /** * Commission meta data. * * @since 3.14.0 * * @var array $meta_data */ protected $meta_data = []; /** * Fixed commission calculator classs instance. * * @since 3.14.0 * * @var \WeDevs\Dokan\Commission\Formula\Fixed $fixed_formula */ protected \WeDevs\Dokan\Commission\Formula\Fixed $fixed_formula; /** * @since 3.14.0 * * @var \WeDevs\Dokan\Commission\Model\Setting */ protected \WeDevs\Dokan\Commission\Model\Setting $fixed_commission_setting; /** * Commission type. * * @since 3.14.0 * * @var mixed */ protected $type; /** * Class constructor. * * @since 3.14.0 * * @param \WeDevs\Dokan\Commission\Model\Setting $settings */ public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings) { } /** * Calculating the category commission. * * @since 3.14.0 * * @return void */ public function calculate() { } /** * Returns calculated commissions meta data. * * @since 3.14.0 * * @return array */ public function get_meta_data(): array { } /** * Sets category commission meta data. * * @since 3.14.0 * * @param array $meta_data * * @return \WeDevs\Dokan\Commission\Formula\CategoryBased */ public function set_meta_data(array $meta_data): \WeDevs\Dokan\Commission\Formula\CategoryBased { } /** * Returns type. * * @since 3.14.0 * * @return mixed */ public function get_type() { } /** * Get commission date parameters. * * @since 3.14.0 * * @return array */ public function get_parameters(): array { } /** * Returns commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns if a category commission is applicable or not. * * @since 3.14.0 * * @return bool */ public function is_applicable(): bool { } /** * Returns true if commission type is valid. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_type(): bool { } /** * Returns if saved commission data is valid to be applied. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_data(): bool { } /** * Validates and returns commission. * * @since 3.14.0 * * @param Setting $setting * * @return Setting */ protected function get_valid_commission_settings(\WeDevs\Dokan\Commission\Model\Setting $setting): \WeDevs\Dokan\Commission\Model\Setting { } /** * Returns admin commission amount. * * @since 3.14.0 * * @return float */ public function get_admin_commission(): float { } /** * Returns vendor earning amount. * * @since 3.14.0 * * @return float */ public function get_vendor_earning(): float { } /** * Returns per item admin commission amount. * * @since 3.14.0 * * @return float */ public function get_per_item_admin_commission(): float { } /** * Returns the quantity on which the commission has been calculated. * * @since 3.14.0 * * @return int */ public function get_items_total_quantity(): int { } } class Combine extends \WeDevs\Dokan\Commission\Formula\AbstractFormula { /** * Per item admin commission value. * * @since 3.14.0 * * @var int|float */ protected $per_item_admin_commission = 0; /** * Admin commission value. * * @since 3.14.0 * * @var int|float */ protected $admin_commission = 0; /** * Vendor earning amount. * * @since 3.14.0 * * @var int|float */ protected $vendor_earning = 0; /** * The quantity on which the commission will be calculated. * * @since 3.14.0 * * @var int */ protected $items_total_quantity = 1; /** * Combine commission source text. * * @since 3.14.0 */ const SOURCE = 'combine'; /** * Class constructor. * * @since 3.14.0 * * @param \WeDevs\Dokan\Commission\Model\Setting $settings */ public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings) { } /** * Calculation is doing here. * * @since 3.14.0 * * @return void */ public function calculate() { } /** * Commission calculation parameters. * * @since 3.14.0 * * @return array */ public function get_parameters(): array { } /** * Returns the combine commission surce text. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns if the combine commission is applicable or not based on data. * * @since 3.14.0 * * @return bool */ public function is_applicable(): bool { } /** * Returns if the commission type data is valid. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_type(): bool { } /** * Returns if commission is valid. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_data(): bool { } /** * Returns the admin commission * * @since 3.14.0 * * @return float */ public function get_admin_commission(): float { } /** * Returns the vendors earning. * * @since 3.14.0 * * @return float */ public function get_vendor_earning(): float { } /** * Returns per item admin commission. * * @since 3.14.0 * * @return float */ public function get_per_item_admin_commission(): float { } /** * Returns the quantity on which the commission is calculated. * * @since 3.14.0 * * @return int */ public function get_items_total_quantity(): int { } } class Fixed extends \WeDevs\Dokan\Commission\Formula\AbstractFormula { /** * Commission type source. * * @since 3.14.0 */ const SOURCE = 'fixed'; /** * Admin commission amount. * * @since 3.14.0 * * @var int|float $admin_commission */ protected $admin_commission = 0; /** * Per item admin commission amount. * * @since 3.14.0 * * @var int|float $per_item_admin_commission */ protected $per_item_admin_commission = 0; /** * Total vendor earning amount. * * @since 3.14.0 * * @var int|float $vendor_earning */ protected $vendor_earning = 0; /** * Total items quantity, on it the commission will be calculated. * * @since 3.14.0 * * @var int $items_total_quantity */ protected $items_total_quantity = 1; /** * @since 3.14.0 * * @var \WeDevs\Dokan\Commission\Formula\Flat */ protected \WeDevs\Dokan\Commission\Formula\Flat $flat_calculator; /** * @since 3.14.0 * * @var \WeDevs\Dokan\Commission\Formula\Percentage */ protected \WeDevs\Dokan\Commission\Formula\Percentage $percentage_calculator; /** * Class constructor. * * @since 3.14.0 * * @param \WeDevs\Dokan\Commission\Model\Setting $settings */ public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings) { } /** * Calculating the fixed commission. * * @since 3.14.0 * * @return void */ public function calculate() { } /** * Get commission date parameters. * * @since 3.14.0 * * @return array */ public function get_parameters(): array { } /** * Returns commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns if a fixed commission is applicable or not. * * @since 3.14.0 * * @return bool */ public function is_applicable(): bool { } /** * Returns true if commission type is valid. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_type(): bool { } /** * Returns if saved commission data is valid to be applied. * * @since 3.14.0 * * @return bool */ protected function is_valid_commission_data(): bool { } /** * Returns admin commission amount. * * @since 3.14.0 * * @return float */ public function get_admin_commission(): float { } /** * Returns vendor earning amount. * * @since 3.14.0 * * @return float */ public function get_vendor_earning(): float { } /** * Returns per item admin commission amount. * * @since 3.14.0 * * @return float */ public function get_per_item_admin_commission(): float { } /** * Returns the quantity on which the commission has been calculated. * * @since 3.14.0 * * @return int */ public function get_items_total_quantity(): int { } } class Flat extends \WeDevs\Dokan\Commission\Formula\AbstractFormula { /** * Commission type source. * * @since 3.14.0 */ const SOURCE = 'flat'; /** * Amount of flat commission. * * @var int|float $flat_commission * * @since 3.14.0 */ protected $flat_commission = 0; /** * Per item admin commission amount. * * @since 3.14.0 * * @var int|float $per_item_admin_commission */ protected $per_item_admin_commission = 0; /** * Admin commission amount. * * @since 3.14.0 * * @var int|float $admin_commission */ protected $admin_commission = 0; /** * Total vendor earning amount. * * @since 3.14.0 * * @var int|float $vendor_earning */ protected $vendor_earning = 0; /** * Total items quantity, on it the commission will be calculated. * * @since 3.14.0 * * @var int $items_total_quantity */ protected $items_total_quantity = 1; /** * Class constructor. * * @since 3.14.0 * * @param \WeDevs\Dokan\Commission\Model\Setting $settings */ public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings) { } /** * Calculating the flat commission. * * @since 3.14.0 * * @return void */ public function calculate() { } /** * Get commission date parameters. * * @since 3.14.0 * * @return array */ public function get_parameters(): array { } /** * Returns commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns if a flat commission is applicable or not. * * @since 3.14.0 * * @return bool */ public function is_applicable(): bool { } /** * Returns admin commission amount. * * @since 3.14.0 * * @return float */ public function get_admin_commission(): float { } /** * Returns vendor earning amount. * * @since 3.14.0 * * @return float */ public function get_vendor_earning(): float { } /** * Returns per item admin commission amount. * * @since 3.14.0 * * @return float */ public function get_per_item_admin_commission(): float { } /** * Returns the quantity on which the commission has been calculated. * * @since 3.14.0 * * @return int */ public function get_items_total_quantity(): int { } } class Percentage extends \WeDevs\Dokan\Commission\Formula\AbstractFormula { /** * Commission type source. * * @since 3.14.0 */ const SOURCE = 'percentage'; /** * Amount of admin commission. * * @var int|float $flat_commission * * @since 3.14.0 */ protected $admin_commission = 0; /** * Per item admin commission amount. * * @since 3.14.0 * * @var int|float $per_item_admin_commission */ protected $per_item_admin_commission = 0; /** * Total vendor earning amount. * * @since 3.14.0 * * @var int|float $vendor_earning */ protected $vendor_earning = 0; /** * Total items quantity, on it the commission will be calculated. * * @since 3.14.0 * * @var int $items_total_quantity */ protected $items_total_quantity = 1; public function __construct(\WeDevs\Dokan\Commission\Model\Setting $settings) { } /** * Class constructor. * * @since 3.14.0 * * @return void */ public function calculate() { } /** * Get commission date parameters. * * @since 3.14.0 * * @return array */ public function get_parameters(): array { } /** * Returns commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns if a percentage commission is applicable or not. * * @since 3.14.0 * * @return bool */ public function is_applicable(): bool { } /** * Returns admin commission amount. * * @since 3.14.0 * * @return float */ public function get_admin_commission(): float { } /** * Returns vendor earning amount. * * @since 3.14.0 * * @return float */ public function get_vendor_earning(): float { } /** * Returns per item admin commission amount. * * @since 3.14.0 * * @return float */ public function get_per_item_admin_commission(): float { } /** * Returns the quantity on which the commission has been calculated. * * @since 3.14.0 * * @return int */ public function get_items_total_quantity(): int { } } } namespace WeDevs\Dokan\Commission\Model { class Setting { /** * Commission type. * * @since 3.14.0 * * @var null|string */ protected $type = \WeDevs\Dokan\Commission\Settings\DefaultSetting::TYPE; /** * Flat commission amount * * @since 3.14.0 * * @var string|float|int */ protected $flat = ''; /** * Commissin percentage amount. * * @since 3.14.0 * * @var string|int|float */ protected $percentage = ''; /** * The category id for which the commission will be applied. * * @since 3.14.0 * @var string|int */ protected $category_id = ''; /** * The category commission data. * * @since 3.14.0 * * @var array */ protected $category_commissions = []; /** * Applied commission meta data. * * @since 3.14.0 * * @var array */ protected $meta_data = []; protected string $source; /** * Returns the commission meta data. * * @since 3.14.0 * * @return array */ public function get_meta_data(): array { } /** * Sets the commission meta data. * * @since 3.14.0 * * @param array $meta_data * * @return $this */ public function set_meta_data(array $meta_data): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the commission type. * * @since 3.14.0 * * @param mixed|string $type * * @return $this */ public function set_type($type): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the commission type. * * @since 3.14.0 * * @param mixed|string $type * * @return $this */ public function set_source(string $source): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the flat commissin amount. * * @since 3.14.0 * * @param mixed|string $flat * * @return $this */ public function set_flat($flat): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the flat commissin amount. * * @since 3.14.0 * * @param mixed|string $flat * * @return $this */ public function set_combined_flat($flat): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the percentage amount. * * @since 3.14.0 * * @param mixed|string $percentage * * @return $this */ public function set_percentage($percentage): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the category commission data. * * @since 3.14.0 * * @param array $category_commissions * * @return $this */ public function set_category_commissions(array $category_commissions): \WeDevs\Dokan\Commission\Model\Setting { } /** * Sets the commission type. * * @since 3.14.0 * * @return mixed|string|null */ public function get_type() { } /** * Sets the commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns the value of the flat settings. * * @since 3.14.0 * * @return string */ public function get_flat(): string { } /** * Returns the flat amount. * * @since 3.14.0 * * @return float */ public function get_flat_value(): float { } /** * Returns the flat amount. * * @since 3.14.0 * * @return float */ public function get_combine_flat(): float { } /** * Returns true if the commission is combined. * N.B. This is a legacy type. It does not exist in the new commission system. * * @return bool */ protected function is_combined(): bool { } /** * Returns the value of the percentage settings. * * @since 3.14.0 * * @return string */ public function get_percentage(): string { } /** * Returns the percentage amount. * * @since 3.14.0 * * @return float */ public function get_percentage_value(): float { } /** * Returns the category commission data. * * @since 3.14.0 * * @return array|mixed|null */ public function get_category_commissions() { } /** * Returns the category id * * @since 3.14.0 * * @return array|mixed|null */ public function get_category_id() { } public function is_applicable(): bool { } /** * Returns the commission settings as an array. * * @since 3.14.0 * * @return array */ public function to_array(): array { } } } namespace WeDevs\Dokan\Commission { /** * Class OrderCommission - Calculate order commission * * @since 4.0.0 * * @package WeDevs\Dokan\Commission */ class OrderCommission extends \WeDevs\Dokan\Commission\AbstractCommissionCalculator implements \WeDevs\Dokan\Commission\Contracts\OrderCommissionInterface { private ?\WC_Order $order; const SELLER = 'seller'; const ADMIN = 'admin'; protected $is_calculated = false; /** * @var Commission[] $admin_net_commission */ protected $commission_by_line_item = []; /** * Get order. * * @since 4.0.0 * * @return \WC_Order|null */ public function get_order(): ?\WC_Order { } /** * Set order. * * @since 4.0.0 * * @param \WC_Order $order * * @return void */ public function set_order(\WC_Order $order): self { } /** * Calculate order commission. * * @since 4.0.0 * * @return Model\Commission|\Exception */ public function calculate(): self { } /** * Calculate commission for refund. * * @since 4.0.0 * * @param \WC_Order_Refund $refund * * @return \WeDevs\Dokan\Commission\Model\Commission */ public function calculate_for_refund(\WC_Order_Refund $refund): \WeDevs\Dokan\Commission\Model\Commission { } /** * Retrieve order commission. * * @since 4.0.0 * @return OrderCommission * @throws \Exception If the order is not set. */ public function get(): \WeDevs\Dokan\Commission\OrderCommission { } /** * Get admin commission. * * @since 4.0.0 * * @return float */ public function get_admin_shipping_fee(): float { } /** * Get admin subsidy. * * @since 4.0.0 * * @return float|int */ public function get_admin_tax_fee() { } /** * Get admin shipping tax fee. * * @since 4.0.0 * * @return float|int */ public function get_admin_shipping_tax_fee() { } /** * Get admin gateway fee. * * @since 4.0.0 * * @return float|int */ public function get_admin_gateway_fee(): float { } /** * Get vendor shipping fee. * * @since 4.0.0 * * @return float|int */ public function get_vendor_shipping_fee(): float { } /** * Get vendor shipping tax fee. * * @since 4.0.0 * * @return float|int */ public function get_vendor_shipping_tax_fee(): float { } /** * Get vendor tax fee. * * @since 4.0.0 * * @return float|int */ public function get_vendor_tax_fee(): float { } /** * Get vendor gateway fee. * * @since 4.0.0 * * @return float|int */ public function get_vendor_earning(): float { } /** * Vendor payout subtotal based on customer's actual payment. * * Returns the vendor’s payable subtotal (excludes admin subsidy) and caps it * to the amount actually paid by the customer (net of refunds) to avoid overpay during payment. * * Formula: * - admin < 0 → vendor_adj = vendor - abs(admin) * - admin ≥ 0 → vendor_adj = vendor * * @since 4.1.3 * * @return float|int */ public function get_vendor_earning_subtotal(): float { } /** * Get dokan gateway fee. * * @since 4.0.0 * * @return float|int */ public function get_total_admin_fees(): float { } /** * Get total vendor fees. * * @since 4.0.0 * * @return float|int */ public function get_total_vendor_fees(): float { } /** * Get dokan gateway fee. * * @since 4.0.0 * * @return array */ private function get_dokan_gateway_fee() { } /** * Get vendor gateway fee. * * @since 4.0.0 * * @return float|int */ public function get_vendor_gateway_fee(): float { } /** * Get data. * * @since 4.0.0 * * @return array */ public function get_data() { } /** * Additional adjustments. * * @since 4.0.0 * * @param \WeDevs\Dokan\Commission\Model\Commission $commission_data * * @return \WeDevs\Dokan\Commission\Model\Commission */ public function additional_adjustments(\WeDevs\Dokan\Commission\Model\Commission $commission_data): \WeDevs\Dokan\Commission\Model\Commission { } /** * Reset the commission related data. * * @return void */ protected function reset_order_commission_data() { } /** * Retrieve the commission object for a specific line item. * * @param int $item_id Line item ID. * * @return OrderLineItemCommission|null The commission object or null if not found. */ public function get_commission_for_line_item(int $item_id): ?\WeDevs\Dokan\Commission\OrderLineItemCommission { } /** * Retrieve all calculated commissions by line item. * * Ensures commission calculations are performed before returning. * * @return Commission[] Associative array of item ID => Commission. */ public function get_all_line_item_commissions(): array { } /** * Ensure commission calculations have been performed. * * Triggers calculation if not already done. */ protected function ensure_commissions_are_calculated(): void { } /** * Get the total admin commission. * * This includes the net commission plus any additional admin fees. * * @since 4.0.0 * @deprecated 5.0.0 Use Commission's get_admin_net_earning() instead. * * @return float */ public function get_admin_commission(): float { } /** * Get the total earning for the admin. * * @since 4.0.0 * * @return float */ public function get_admin_total_earning(): float { } /** * Get the total earning for the vendor. * * @since 4.0.0 * @return float * @deprecated 4.0.0 Use get_vendor_earning() instead. */ public function get_vendor_total_earning(): float { } /** * Get the total shipping refunded. * * @return float */ protected function get_shipping_refunded(): float { } /** * Get the tax refunded. * * @return float */ protected function get_tax_refunded(): float { } /** * Get the total shipping tax refunded. * * @return float */ protected function get_total_shipping_tax_refunded(): float { } /** * Get the order fee for admin. * * @since 4.1.0 * * @return float */ protected function get_admin_order_fees(): float { } /** * Get the order fee for vendor. * * @since 4.1.0 * * @return float */ protected function get_vendor_order_fees(): float { } /** * Get order fee recipient. * * @since 4.1.0 * * @return string */ protected function get_order_fee_recipient(): string { } /** * Get the refunded order fee. * * @return float */ protected function get_order_fee_refunded(): float { } } /** * Class OrderLineItemCommission - Calculate order line item commission * * @since 4.0.0 */ class OrderLineItemCommission extends \WeDevs\Dokan\Commission\AbstractCommissionCalculator { /** * Order line item. * * @since 4.0.0 * * @var \WC_Order_Item_Product $item */ protected $item; /** * Order line item commission meta key. * * @since 4.0.0 * * @var string */ const VENDOR_ID_META_KEY = '_dokan_vendor_id'; /** * @var \WC_Order $order */ protected \WC_Order $order; /** * @var int $vendor_id */ protected int $vendor_id; /** * @var array $coupon_infos */ protected array $coupon_infos = []; /** * Get the line item. * * @param \WC_Order_Item_Product $item * @param \WC_Order $order */ public function get_item(): \WC_Order_Item { } /** * Set order item to calculate commission. * * * @param WC_Order_Item $item * @return void */ public function set_item(\WC_Order_Item $item): void { } /** * Get the order of the associated line item to calculate the commission. * * @return \WC_Order */ public function get_order(): \WC_Order { } /** * @return array */ protected function get_coupon_infos(): array { } /** * Set order to calculate commission. * * @param WC_Order $order * @return void */ public function set_order(\WC_Order $order): void { } /** * Calculate order line item commission. * * @since 4.0.0 * * @return OrderLineItemCommission |null */ public function calculate(): \WeDevs\Dokan\Commission\OrderLineItemCommission { } /** * Set the commission data to this class. * * @param Commission $commission * @return self */ protected function set_commission_data(\WeDevs\Dokan\Commission\Model\Commission $commission): self { } /** * Calculate and get the vendor earning & admin commission in refunded item. * * @param WC_Order_Item $refund_item * @return Commission */ public function calculate_for_refund_item(\WC_Order_Item $refund_item): \WeDevs\Dokan\Commission\Model\Commission { } /** * Check if the refund should be adjusted. * * @since 4.0.0 * * @return Commission */ public function adjust_refunds(\WeDevs\Dokan\Commission\Model\Commission $commission): \WeDevs\Dokan\Commission\Model\Commission { } /** * Retrieve commission data from order item meta. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Model\Commission * * @throw \Exception */ public function get(): \WeDevs\Dokan\Commission\Model\Commission { } } /** * Class OrderRefundCommission - Calculate the vendor earning and admin commission portions of an order refund. * * The line-item portions are prorated from the order's commission * (see Calculator::calculate_for_refund()), while refunded tax, shipping * and gateway fees are routed to whichever party received them originally. * * @since 5.0.10 * * @package WeDevs\Dokan\Commission */ class OrderRefundCommission { const SELLER = \WeDevs\Dokan\Commission\OrderCommission::SELLER; const ADMIN = \WeDevs\Dokan\Commission\OrderCommission::ADMIN; /** * The refund being calculated. * * @var WC_Order_Refund|null */ private ?\WC_Order_Refund $refund = null; /** * The refunded (parent of the refund) order. * * @var WC_Order|null */ private ?\WC_Order $order = null; /** * Whether the refund commission has been calculated. * * @var bool */ protected bool $is_calculated = false; /** * Prorated line-item commission portions of the refund. * * @var Commission|null */ protected ?\WeDevs\Dokan\Commission\Model\Commission $refund_commission = null; /** * Set the refund to calculate for. * * @since 5.0.10 * * @param WC_Order_Refund $refund * * @return self */ public function set_refund(\WC_Order_Refund $refund): self { } /** * Get the refund. * * @since 5.0.10 * * @return WC_Order_Refund|null */ public function get_refund(): ?\WC_Order_Refund { } /** * Set the refunded order explicitly. * * Optional; when omitted the order is resolved from the refund's parent ID. * * @since 5.0.10 * * @param WC_Order $order * * @return self */ public function set_order(\WC_Order $order): self { } /** * Get the refunded order. * * @since 5.0.10 * * @return WC_Order|null */ public function get_order(): ?\WC_Order { } /** * Calculate the commission portions of the refund. * * @since 5.0.10 * * @throws \Exception If the refund or its parent order is not resolvable. * * @return self */ public function calculate(): self { } /** * Get the vendor's prorated net earning in the refund (line items only). * * @since 5.0.10 * * @return float */ public function get_vendor_net_earning(): float { } /** * Get the admin's prorated net commission in the refund (line items only). * * @since 5.0.10 * * @return float */ public function get_admin_net_commission(): float { } /** * Get the admin's prorated net earning in the refund. * * Populated instead of commission/vendor earning for admin-earning * order types (subscriptions, advertisements, etc.). * * @since 5.0.10 * * @return float */ public function get_admin_net_earning(): float { } /** * Get the refunded tax (product tax + shipping tax) allocated to the vendor. * * @since 5.0.10 * * @return float */ public function get_vendor_tax_refund(): float { } /** * Get the refunded tax (product tax + shipping tax) allocated to the admin. * * @since 5.0.10 * * @return float */ public function get_admin_tax_refund(): float { } /** * Get the refunded shipping allocated to the vendor. * * @since 5.0.10 * * @return float */ public function get_vendor_shipping_refund(): float { } /** * Get the refunded shipping allocated to the admin. * * @since 5.0.10 * * @return float */ public function get_admin_shipping_refund(): float { } /** * Get the gateway fee returned to the vendor for the refunded portion. * * Defaults to 0 via the `dokan_refund_gateway_fee` filter; supplied by the * associated payment gateway when it returns its fee on refund. * * @since 5.0.10 * * @return float */ public function get_vendor_gateway_fee_refund(): float { } /** * Get the gateway fee returned to the admin for the refunded portion. * * Defaults to 0 via the `dokan_refund_gateway_fee` filter; supplied by the * associated payment gateway when it returns its fee on refund. * * @since 5.0.10 * * @return float */ public function get_admin_gateway_fee_refund(): float { } /** * Get the total amount the vendor gives back for this refund. * * Prorated line-item earning plus refunded tax/shipping allocated to the * vendor, minus any gateway fee the payment gateway returns to the vendor * (0 unless the gateway supplies it via `dokan_refund_gateway_fee`). * * @since 5.0.10 * * @return float */ public function get_vendor_total_refund(): float { } /** * Get the total amount the admin gives back for this refund. * * Prorated line-item commission (plus admin net earning for admin-earning * order types) plus refunded tax/shipping allocated to the admin, minus any * gateway fee the payment gateway returns to the admin (0 unless the * gateway supplies it via `dokan_refund_gateway_fee`). * * @since 5.0.10 * * @return float */ public function get_admin_total_refund(): float { } /** * Whether the refunded order is a parent order holding sub-orders. * * Parent orders are excluded from commission adjustment; the vendor * sub-orders carry the actual earnings. * * @since 5.0.10 * * @return bool */ protected function has_sub_orders(): bool { } /** * Ensure the refund commission has been calculated. * * @since 5.0.10 * * @return void */ protected function ensure_calculated(): void { } /** * Get the refunded tax allocated to the given recipient. * * @since 5.0.10 * * @param string $recipient Either self::SELLER or self::ADMIN. * * @return float */ protected function get_tax_refund_for(string $recipient): float { } /** * Get the refunded shipping allocated to the given recipient. * * @since 5.0.10 * * @param string $recipient Either self::SELLER or self::ADMIN. * * @return float */ protected function get_shipping_refund_for(string $recipient): float { } /** * Get the gateway fee returned for the refunded portion, when paid by the given recipient. * * Most payment gateways keep their processing fee when a payment is * refunded, so this defaults to 0. Gateways that do return the fee on * refund (e.g. Paystack) should hook `dokan_refund_gateway_fee` and supply * the returned amount; the prorated share * ( order_gateway_fee × |refund_total| / order_total ) is provided as a * convenience. * * @since 5.0.10 * * @param string $recipient Either self::SELLER or self::ADMIN. * * @return float */ protected function get_gateway_fee_refund_for(string $recipient): float { } /** * Get the refunded tax and shipping-tax totals from the refund's tax items. * * @since 5.0.10 * * @return array{tax: float, shipping_tax: float} */ protected function get_refunded_tax_totals(): array { } /** * Get the gateway fee borne by the given recipient. * * Mirrors OrderCommission::get_vendor_gateway_fee() and * get_admin_gateway_fee(): the `dokan_gateway_fee` meta belongs to the * `dokan_gateway_fee_paid_by` party, while the admin may bear its own * separately stored portion (`dokan_admin_gateway_fee` meta) even when the * seller pays the vendor share — e.g. Paystack split payments distribute * the fee between the vendor and the admin. * * @since 5.0.10 * * @param string $recipient Either self::SELLER or self::ADMIN. * * @return float */ protected function get_gateway_fee_borne_by(string $recipient): float { } /** * Get the order's gateway fee and who paid it. * * @since 5.0.10 * * @return array{fee: float, paid_by: string} */ protected function get_dokan_gateway_fee(): array { } } /** * Class OrderLineItemCommission - Calculate order line item commission * * @since 4.0.0 */ class ProductCommission extends \WeDevs\Dokan\Commission\AbstractCommissionCalculator { protected ?int $product_id; protected ?int $category_id; protected ?int $vendor_id; protected $total_amount; public function get_product_id(): ?int { } public function set_product_id(?int $product_id): void { } public function set_category_id(?int $category_id): void { } public function set_vendor_id(?int $vendor_id): void { } /** * @param mixed $total_amount */ public function set_total_amount($total_amount): void { } /** * Calculate order line item commission. * * @since 4.0.0 * * @param $auto_save * * @return \WeDevs\Dokan\Commission\Model\Commission|DokanException */ public function calculate(): \WeDevs\Dokan\Commission\Model\Commission { } /** * Retrieve commission data from order item meta. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Model\Commission */ public function get(): \WeDevs\Dokan\Commission\Model\Commission { } } class RecalculateCommissions { const RECALCULATE_ORDER_ID_OPTION_PREFIX = 'dokan_commission_recalculate_order_id:'; public function __construct() { } public function recalculate_commission_when_any_new_line_item_added($item_id, $item, $order_id) { } public function recalculate_commission_when_any_line_item_edited($order_id, $items) { } /** * @param $item_id * @param $item * @param $changed_stock * @param bool|WC_Order|WC_Order_Refund $order * * @return void */ public function recalculate_commission_when_any_line_item_removed($item_id, $item, $changed_stock, $order) { } public function overwrite_woocommerce_remove_order_tax_method() { } public function remove_order_tax() { } /** * Overwrite WooCommerce's remove_order_coupon method. * * @since 4.0.0 * * @return void */ public function overwrite_woocommerce_remove_order_coupon_method() { } /** * Overwrite WooCommerce's add_coupon_discount_method method. * * @since 4.0.0 * * @return void */ public function overwrite_woocommerce_add_coupon_discount_method() { } /** * Remove a coupon from an order on ajax request. * * @since 4.0.0 * * @return void */ public function remove_order_coupon() { } /** * Adjust admin commission and vendor earning after coupon removed. * * @since 4.0.0 * * @param int $order_id * * @return void */ public function adjust_admin_commission_and_vendor_earning_after_coupon_removed($order_id) { } /** * Adjust admin commission and vendor earning. * * @param WC_Order $order * * @return void */ protected function adjust_admin_commission_and_vendor_earning($order) { } /** * Add order discount via Ajax. * * @since 4.0.0 * * @return void */ public function add_coupon_discount() { } } } namespace WeDevs\Dokan\Commission\Settings { /** * Setting interface class. * * @since 3.14.0 */ interface InterfaceSetting { /** * Get commission setting. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting; } /** * Default setting class * * @since 3.14.0 */ class DefaultSetting implements \WeDevs\Dokan\Commission\Settings\InterfaceSetting { const TYPE = \WeDevs\Dokan\Commission\Formula\Fixed::SOURCE; /** * Returns default setting. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting { } } class GlobalSetting implements \WeDevs\Dokan\Commission\Settings\InterfaceSetting { /** * Product id to get a commission. * * @since 3.14.0 * * @var int */ protected int $category_id; /** * Class constructor. * * @since 3.14.0 * * @param int $category_id */ public function __construct(int $category_id) { } /** * Returns product commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting { } /** * Saves and returns product commission settings data. * * @since 3.14.0 * * @param array $setting { * * @type string $percentage * @type string $type * @type string $flat * @type array $category_commissions * } * * @return void */ public function save(array $setting): void { } } class OrderItem implements \WeDevs\Dokan\Commission\Settings\InterfaceSetting { protected \WC_Order_Item $order_item; protected $product_price_to_calculate_commission; /** * Class constructor. * * @since 3.14.0 * * @param array $data */ public function __construct(\WC_Order_Item $order_item) { } /** * Rrturns order item commission settings. * * @since 3.14.0 * * @throws \Exception * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting { } /** * Saves order item commission settings. * * @since 3.14.0 * * @param array $setting * * @throws \Exception * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function save(array $setting): \WeDevs\Dokan\Commission\Model\Setting { } } class Product implements \WeDevs\Dokan\Commission\Settings\InterfaceSetting { /** * Product id to get a commission. * * @since 3.14.0 * * @var WC_Product */ protected $product; public function __construct($product_id) { } /** * Returns product commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting { } /** * Saves and returns product commission settings data. * * @since 3.14.0 * * @param array $setting { * * @type string $percentage * @type string $type * @type string $flat * } * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function save(array $setting): \WeDevs\Dokan\Commission\Model\Setting { } } class Vendor implements \WeDevs\Dokan\Commission\Settings\InterfaceSetting { protected int $category_id; /** * Product id to get a commission. * * @since 3.14.0 * * @var \WeDevs\Dokan\Vendor\Vendor */ protected $vendor; public function __construct($vendor_id, int $category_id = 0) { } /** * Returns product commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get(): \WeDevs\Dokan\Commission\Model\Setting { } /** * Saves and returns product commission settings data. * * @since 3.14.0 * * @param array $setting { * * @type string $percentage * @type string $type * @type string $flat * @type array $category_commissions * } * * @return Setting */ public function save(array $setting): \WeDevs\Dokan\Commission\Model\Setting { } public function delete() { } } } namespace WeDevs\Dokan\Commission\Strategies { abstract class AbstractStrategy { protected ?\WeDevs\Dokan\Commission\Strategies\AbstractStrategy $next = null; protected ?\WeDevs\Dokan\Commission\Model\Setting $settings; public function __construct() { } /** * Returns commission strategy source. * * @since 3.14.0 * * @return string */ abstract public function get_source(): string; /** * Returns commission settings. * * @since 3.14.0 * * @return void */ abstract public function set_settings(); /** * Returns the commission settings from the first applicable strategy in the chain. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Model\Setting|null */ public function get_settings(): ?\WeDevs\Dokan\Commission\Model\Setting { } /** * Returns the first strategy in the chain that has applicable commission settings. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Strategies\AbstractStrategy|null */ public function get_eligible_strategy(): ?\WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Gets the next fallback strategy in the chain. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Strategies\AbstractStrategy|null */ public function get_next(): ?\WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Sets the next fallback strategy in the chain. * * @since 4.0.0 * * @return \WeDevs\Dokan\Commission\Strategies\AbstractStrategy */ abstract public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy; /** * Saves the applicable commission settings to the order item. * * Only applies if this is an instance of OrderItemStrategy and a valid setting is found. * * @since 4.0.0 * * @param \WC_Order_Item $order_item WooCommerce order item instance. * * @return void */ public function save_settings_to_order_item(\WC_Order_Item $order_item): void { } /** * Returns an instance of OrderItemSetting to save commission settings to the order item. * Useful for mocking during unit tests. * * @since 4.0.0 * * @param \WC_Order_Item $order_item WooCommerce order item. * * @return \WeDevs\Dokan\Commission\Settings\OrderItem */ protected function get_order_item_setting_saver(\WC_Order_Item $order_item): \WeDevs\Dokan\Commission\Settings\OrderItem { } } class DefaultStrategy extends \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { /** * Global commission strategy source. * * @since 3.14.0 */ const SOURCE = 'default'; /** * Returns global strategy source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * @inheritDoc */ public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Returns global commission settings. * * @since 3.14.0 * * @return void */ public function set_settings() { } } class GlobalStrategy extends \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { /** * Global commission strategy source. * * @since 3.14.0 */ const SOURCE = 'global'; /** * Catgory id for category commission. * * @since 3.14.0 * * @var mixed */ protected $category_id; /** * Class constructor. * * @since 3.14.0 * * @param $category_id */ public function __construct($category_id) { } /** * @inheritDoc */ public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Returns category id. * * @since 3.14.0 * * @return mixed */ public function get_category_id() { } /** * Returns global strategy source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns global commission settings. * * @since 3.14.0 * * @return void */ public function set_settings() { } } /** * If an order has been purchased previously, calculate the earning with the previously stated commission rate. * It's important cause commission rate may get changed by admin during the order table `re-generation`. */ class OrderItem extends \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { /** * Order item commission strategy source. * * @since 3.14.0 */ const SOURCE = 'order_item'; /** * Order item id. * * @since 3.14.0 * * @var \WC_Order_Item_Product $order_item */ protected $order_item; /** * The vendor id of the order item. * * @var integer */ protected $vendor_id = 0; /** * Class constructor. * * @since 3.14.0 * * @param \WC_Order_Item_Product $order_item * @param int|float $total_amount * @param int $total_quantity * * @return void */ public function __construct($order_item = '', $vendor_id = 0) { } /** * @inheritDoc */ public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Returns order item strategy source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns order item commission settings. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function set_settings() { } /** * Returns order item id. * * @since 4.0.0 * * @return int|mixed|string */ public function get_order_item_id() { } } class Product extends \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { /** * Product id * * @since 3.14.0 * * @var int */ protected $product_id; protected $vendor_id; protected ?int $category_id; /** * Product strategy source * * @since 3.14.0 */ const SOURCE = 'product'; /** * Class constructor. * * @since 3.14.0 * * @param $product_id */ public function __construct($product_id, $vendor_id = 0, $category_id = null) { } /** * @inheritDoc */ public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Get category for the given product. * * @param int $product_id * @return void|int */ protected function get_category_from_product($product_id) { } /** * Returns product strategy source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns product commission settings. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function set_settings() { } } class Vendor extends \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { /** * Vendor data. * * @since 3.14.0 * * @var int */ protected $vendor_id; /** * Vendor strategy source. * * @since 3.14.0 */ const SOURCE = 'vendor'; /** * Category id. * * @since 3.14.0 * * @var mixed */ protected $category_id; /** * Class constructor. * * @since 3.14.0 * * @param int $vendor_id * @param int $category_id * * @return void */ public function __construct($vendor_id, $category_id) { } /** * @inheritDoc */ public function set_next(): \WeDevs\Dokan\Commission\Strategies\AbstractStrategy { } /** * Returns category id. * * @since 3.14.0 * * @return int */ public function get_category_id() { } /** * Returns vendor commission source. * * @since 3.14.0 * * @return string */ public function get_source(): string { } /** * Returns vendor commission settings. * * @since 3.14.0 * * @return void */ public function set_settings() { } } } namespace WeDevs\Dokan\Commission\Upugrader { class Update_Category_Commission { /** * The batch size for processing categories * * @since 3.14.0 */ const BATCH_SIZE = 20; /** * The hook name for processing batches * * @since 3.14.0 */ const PROCESS_BATCH_HOOK = 'process_category_batch'; const PROCESS_BATCH_HOOK_CREATOR = 'process_category_batch_creator'; /** * * @since 3.14.0 */ const PROCESS_ITEM_HOOK = 'process_category_item'; /** * Initialize the processor */ public function init_hooks() { } /** * Start the batch processing * * @since 3.14.0 * * @return void */ public function start_processing() { } /** * Batch queue creator. * * @since 3.14.0 * * @return void */ public function process_batch_creator() { } /** * Process a batch of categories * * @since 3.14.0 * * @param int $page_number Current page number * * @return void */ public function process_batch($offset) { } /** * Schedule the next batch of categories * * @since 3.14.0 * * @param int $page_number Next page number to process * * @return void */ protected function schedule_next_batch($offset) { } /** * Schedule a category item for processing. * * @since 3.14.0 * * @param $term * * @return void */ private function schedule_cat_item($term) { } /** * Get a batch of categories. * * @since 3.14.0 * * @param int $page_number Page number to fetch * * @return array Array of term objects */ protected function get_categories_batch($offset) { } /** * Get the total number of categories * * @since 3.14.0 * * @return int[]|string|string[]|\WP_Error|\WP_Term[] */ protected function category_count() { } /** * Process a single category. * * @since 3.14.0 * * @param int $term Category term object * * @return void */ public function process_single_category($term_id) { } /** * Check if processing is currently running. * * @since 3.14.0 * * @return bool */ public function is_processing() { } } class Update_Product_Commission { /** * The batch size for processing products * * @since 3.14.0 */ const BATCH_SIZE = 10; /** * The hook name for processing batches * * @since 3.14.0 */ const PROCESS_BATCH_HOOK = 'process_product_batch'; const PROCESS_BATCH_HOOK_CREATOR = 'process_product_batch_creator'; /** * * @since 3.14.0 */ const PROCESS_ITEM_HOOK = 'process_product_item'; public function init_hooks() { } /** * Start the batch processing * * @since 3.14.0 * * @return void */ public function start_processing() { } /** * Batch queue creator. * * @since 3.14.0 * * @return void */ public function process_batch_creator() { } /** * Process a batch of products * * @since 3.14.0 * * @param int $offset Current offset * @param int $total_products Total number of products * * @return void */ public function process_batch($offset, $total_products) { } /** * Schedule the next batch of products * * @since 3.14.0 * * @param int $offset Current offset * @param int $total_products Total number of products * * @return void */ protected function schedule_next_batch($offset, $total_products) { } /** * Schedule a single product for processing. * * @since 3.14.0 * * @param $item * * @return void */ private function schedule_item($item) { } /** * Get a batch of products * * @since 3.14.0 * * @param int $offset Current offset * * @return WC_Product[] Array of product objects */ protected function get_products_batch($offset) { } /** * Get total number of products * * @since 3.14.0 * * @return int */ protected function get_total_products() { } /** * Process a single product * Customize this method based on what you need to do with each product * * @since 3.14.0 * * @param int $product * * @return void */ public function process_single_product($product_id) { } /** * Check if processing is currently running * * @since 3.14.0 * * @return bool */ public function is_processing() { } } class Update_Vendor_Commission { /** * Hook names for processing */ const PROCESS_BATCH_HOOK_CREATOR = 'process_vendor_batch_creator'; const PROCESS_BATCH_HOOK = 'process_vendor_batch'; const PROCESS_ITEM_HOOK = 'process_vendor_item'; /** * Batch size */ const BATCH_SIZE = 10; /** * Initialize the processor * * @since 3.14.0 */ public function init_hooks() { } /** * Start the batch processing * * @since 3.14.0 * * @return void */ public function start_processing() { } /** * Batch queue creator. * * @since 3.14.0 * * @return void */ public function process_batch_creator() { } /** * Process a batch of vendors * * @since 3.14.0 * * @param int $page_number Current page number * @param int $max_pages Total number of pages * * @return void */ public function process_batch($page_number, $max_pages) { } /** * Get a batch of vendors * * @since 3.14.0 * * @param int $page_number Page number to fetch * * @return \WeDevs\Dokan\Vendor\Vendor[] Array of vendor objects */ protected function get_vendors_batch($page_number) { } /** * Schedule an individual vendor for processing * * @since 3.14.0 * * @param int $vendor_id * * @return void */ private function schedule_item($vendor_id) { } /** * Process a single vendor * * @since 3.14.0 * * @param int $vendor_id Vendor ID * * @return void */ public function process_single_vendor($vendor_id) { } /** * Log vendor update status * * @since 3.14.0 * * @param int $vendor_id * @param bool $success * @param string $error_message * * @return void */ private function log_vendor_update($vendor_id, $success, $error_message = '') { } /** * Check if processing is currently running * * @since 3.14.0 * * @return bool */ public function is_processing() { } } } namespace WeDevs\Dokan { /** * Core Class for Dokan Main functionality * * @since 3.0.0 * * @package dokan */ class Core { /** * Load autometically when class initiate * * @since 3.0.0 */ public function __construct() { } /** * Block user access to admin panel for specific roles * * @since 1.0.0 * * @global string $pagenow */ public function block_admin_access() { } /** * Hide other users uploads for `seller` users * * Hide media uploads in page "upload.php" and "media-upload.php" for * sellers. They can see only thier uploads. * * FIXME: fix the upload counts * * @param string $where * * @global object $wpdb * @global string $pagenow * * @return string */ public function hide_others_uploads($where) { } /** * Add body class for dokan-dashboard * * @since 3.0.0 * * @param array $classes */ public function add_dashboard_template_class($classes) { } /** * Create a nicely formatted and more specific title element text for output * in head of document, based on current view. * * @since Dokan 1.0.4 * * @param string $title Default title text for current view. * @param string $sep Optional separator. * * @return string The filtered title. */ public function wp_title($title, $sep) { } /** * Redirect if not logged Seller * * @since 2.4 * * @return void [redirection] */ public function redirect_if_not_logged_seller() { } /** * Redirect after activation * * @since 2.8.0 * * @return void */ public function redirect_after_activate() { } } /** * Dokan Customiezr */ class Customizer { /** * Settings capability * * @var string */ private $capability = 'manage_options'; /** * Constructor */ public function __construct() { } /** * Enequeue customize scripts for previewer * * @return void */ public function enqueue_preview_scripts() { } /** * Enqueue customize scripts for controls * * @return void */ public function enqueue_control_scripts() { } /** * Add settings to the customizer. */ public function add_sections(\WP_Customize_Manager $wp_customize) { } /** * Add store sections * * @return void */ protected function add_store_section(\WP_Customize_Manager $wp_customize) { } /** * Activate/deactivate controls if store sidebar is enabled * * When the theme sidebar is enabled, we need to deactivate the * sidebar widget controls. It's been done instantly from JS in * the `customize-controls.js` file, but when the preview * refreshes, it appears again because customizer values are set * again when it does. So based on the settings chosen from the * customizer, we need to activate/deactivate from the PHP side * as well. * * @return bool */ public function should_display_widget_controls(\WP_Customize_Control $control) { } /** * Converts a boolean value to a 'on' or 'off'. * * @param bool $bool * * @return string */ public function bool_to_on_off($bool) { } /** * Convert a 'on' or 'off' to boolean * * @param string $value * * @return bool */ public function on_off_to_bool($value) { } /** * Convert an empty value to boolean * * @param string $value * * @return bool */ public function empty_to_bool($value) { } /** * Convert a boolean value to empty/string * * @param string $value * * @return bool */ public function bool_to_string($value, $obj) { } } } namespace WeDevs\Dokan\Customizer { /** * The radio image class. */ class HeadingControl extends \WP_Customize_Control { /** * Declare the control type. * * @var string */ public $type = 'dokan-heading'; /** * Render the control's content. * * @see WP_Customize_Control::render_content() */ protected function render_content() { } } /** * The radio image class. */ class RadioImageControl extends \WP_Customize_Control { /** * Declare the control type. * * @var string */ public $type = 'dokan-radio-image'; /** * Enqueue scripts and styles for the custom control. */ public function enqueue() { } /** * Print radio image style * * @return void */ public static function print_inline_style() { } /** * Render the control to be displayed in the Customizer. */ public function render_content() { } } } namespace WeDevs\Dokan\Dashboard { class Manager { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } } } namespace WeDevs\Dokan\Dashboard\Templates { /** * Dokan Template Dashboard Class * * @author weDves */ class Dashboard { /** * @var int $user_id current user id */ protected $user_id; /** * @var array $order_count */ protected $orders_count; /** * Load autometically when class inistantiate * hooked up all actions and filters * * @since 2.4 */ public function __construct() { } /** * Get Seller Dashboard Notice * * @since 2.4 * * @return void */ public function show_seller_dashboard_notice() { } /** * Get big counter widget in dashboard * * @since 2.4 * * @return void */ public function get_big_counter_widgets() { } /** * Get order widget in Dashboard * * @since 2.4 * * @return void */ public function get_orders_widgets() { } /** * Get product widgets in dashboard * * @since 2.4 * * @return void */ public function get_products_widgets() { } /** * Get sales report chart widget in dashboard * * @since 2.4 * * @return void */ public function get_sales_report_chart_widget() { } /** * Get orders Count * * @since 2.4 * * @return array */ public function get_orders_count() { } /** * Get Post Count * * @since 2.4 * * @return array */ public function get_post_counts() { } /** * Get Comments Count * * @since 2.4 * * @return array */ public function get_comment_counts() { } /** * Get Pageview Count * * @since 2.4 * * @return integer */ public function get_pageviews() { } /** * Get Author Sales Count * * @since 2.4 * * @return integer */ public function get_earning() { } /** * Get Seller Balance * * @since 2.4 * * @return integer */ public function get_seller_balance() { } } class Main { public function __construct() { } /** * Dashboard Side Navigations * * @since 2.4 * * @return void */ public static function dashboard_side_navigation() { } /** * Adds notification count to menu and submenu of vendor dashboard * * @since 3.10.3 * * @param string $menu_title Menu title * @param array $menu_details Menu details array * * @return string */ public function add_notification_count(string $menu_title, array $menu_details): string { } } class Manager { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } } /** * Multi step category ui class. * * @since 3.6.2 */ class MultiStepCategories { /** * Class constructor. * * @since 3.6.2 */ public function __construct() { } /** * Returns new category select ui html elements. * * @since 3.6.2 * * @return void */ public function load_add_category_modal() { } } class NewDashboard { /** * Class constructor * * @since 4.0.0 */ public function __construct() { } /** * Add query var for new dashboard. * * @since 4.0.0 * * @param array $query_vars * * @return array */ public function add_query_var($query_vars) { } /** * Load new dashboard content. * * @since 4.0.0 * * @param array $query_vars * * @return void */ public function new_dashboard_content($query_vars) { } /** * Enqueue scripts for new dashboard. * * @since 4.0.0 * * @return void */ public function enqueue_scripts() { } } /** * Dokan Order Template Class * * @since 2.4 * * @author weDves */ class Orders { /** * Load autometically when class inistantiate * hooked up all actions and filters * * @since 2.4 */ public function __construct() { } /** * Show Seller Enable Error Message * * @since 2.4 * * @return void */ public function show_seller_enable_message() { } /** * Render Order listing status filter template * * @since 2.4 * * @return void */ public function order_listing_status_filter() { } /** * Render the order details page * * @since 3.6.3 */ public function order_details_content() { } /** * Get Order Main Content * * @since 2.4 * @since 3.6.3 Moved order details content to a different function * * @return void */ public function order_main_content() { } /** * Export user orders to CSV format * * @since 1.4 * @since 3.2.13 dokan_export_order permission check added * for vendor staff * * @return void */ public function handle_order_export() { } /** * Add a specific class to the body of Vendor Dashboard Orders page to apply css into the select2 input box * * @since 3.6.3 * * @param array $classes * * @return array */ public function add_css_class_to_body($classes) { } /** * Add Pagination information into template arguments * * @since 3.6.3 * * @param int $limit * @param int $page * @param array $args * @param array $query_args * * @return array */ private function add_pagination_info($limit, $page, $order_count) { } /** * Add pending order count to dashboard menu. * * @since 3.10.3 * * @param array $menu Menu Array. * * @return array */ public function add_pending_order_count($menu) { } } /** * Product Functionality for Product Handler * * @since 2.4 * * @package dokan */ class Products { public static $errors; public static $product_cat; public static $post_content; /** * Load autometially when class initiate * * @since 2.4 * * @uses actions * @uses filters */ public function __construct() { } /** * Set errors * * @since 3.0.0 * * @param void $errors * * @return void */ public function set_errors($errors) { } /** * Verify if the instance contains errors * * @since 3.0.0 * * @return bool */ public function has_errors() { } /** * Retrieve all errors * * @since 3.0.0 * * @return array */ public function get_errors() { } /** * Load product * * @since 1.0.0 * * @return void */ public static function load_download_virtual_template($post, $post_id) { } /** * Load invendor template * * @since 2.9.2 * * @uses apply_filters() Calls 'dokan_hide_inventory_template' to allow plugins * to conditionally hide the inventory template section. * Return true to hide, false to display. * / * @return void */ public static function load_inventory_template($post, $post_id) { } /** * Load downloadable template * * @since 2.9.2 * * @return void */ public static function load_downloadable_template($post, $post_id) { } /** * Load others item template * * @since 2.9.2 * * @return void */ public static function load_others_template($post, $post_id) { } /** * Render New Product Template for only free version * * @since 2.4 * * @param array $query_vars * * @return void */ public function render_new_product_template($query_vars) { } /** * Load Product Edit Template * * @since 2.4 * * @return void */ public function load_product_edit_template() { } /** * Render Product Edit Page for Email. * * @since 3.9.1 * * @return void */ public function render_product_edit_page_for_email() { } /** * Render Product Listing Template * * @since 2.4 * * @param string $action * * @return void */ public function render_product_listing_template($action) { } /** * Handle product add * * @return void */ public function handle_product_add() { } /** * Handle product update * * @return void */ public function handle_product_update() { } public function load_add_new_product_popup() { } /** * Add new product open modal html * * @since 3.7.0 * * @return void */ public function load_add_new_product_modal() { } /** * Handle delete product link * * @return void */ public function handle_delete_product() { } } /** * Load Reverse Withdrawal Template * * @since 3.5.1 * * @package Wedevs\Dokan\Dashboard\Templates */ class ReverseWithdrawal { /** * @since 3.5.1 * * @var int $seller_id */ protected $seller_id; /** * @since 3.5.1 * * @var string[] $transaction_date */ protected $transaction_date = ['from' => '', 'to' => '']; /** * Class Constructor. * * @since 3.5.1 */ public function __construct() { } /** * Display notice on vendor dashboard page * * @since 3.5.1 * * @return void */ public function display_notice_on_vendor_dashboard() { } /** * Display notice on reverse withdrawal page * * @since 3.5.1 * * @return void */ public function display_payment_notice() { } /** * Display action taken notice * * @since 3.5.1 * * @return void */ public function display_action_taken_notice() { } /** * Dokan Reverse Withdrawal header Template render * * @since 3.5.1 * * @return void */ public function render_header() { } /** * Load payment section * * @since 3.5.1 * * @return void */ public function render_balance_section() { } /** * Dokan Reverse Withdrawal header Template render * * @since 3.5.1 * * @return void */ public function render_filter_section() { } /** * Dokan Reverse Withdrawal header Template render * * @since 3.5.1 * * @return void */ public function render_transactions_table() { } /** * Enqueue Frontend Scripts * * @since 3.5.1 * * @param string $hook * * @return void */ public function wp_enqueue_scripts($hook) { } /** * Localize Reverse Withdrawal Scripts * * @since 3.5.1 * * @param array $localize_script * * @return array */ public function localized_scripts($localize_script) { } /** * Get transaction date * * @since 3.5.1 * * @return string[] */ protected function get_transaction_date() { } } /** * Dokan settings Class * * @author weDves */ class Settings { public $currentuser; public $profile_info; /** * Loading autometically when class initiate * * @since 2.4 * * @return void */ public function __construct() { } /** * Show Seller Enable Error Message * * @since 2.4 * * @return void */ public function show_enable_seller_message() { } /** * Render Settings Header * * @since 2.4 * * @return void */ public function render_settings_header() { } /** * Render Settings help * * @since 2.4 * * @return void */ public function render_settings_help() { } /** * Render Settings Progressbar * * @since 2.4 * * @return void */ public function render_settings_load_progressbar() { } /** * Render Settings Content * * @since 2.4 * * @return void */ public function render_settings_content() { } /** * Load Store Content * * @since 2.4 * * @return void */ public function load_store_content() { } /** * Get sellers connected and not connected payment methods. * * @param $seller_id * * @param $active_payment_methods * * @return array */ public function get_seller_payment_methods($seller_id = '', $active_payment_methods = []): array { } /** * Validate payment access and check active methods * * @since 4.2.9 * * @param array $active_methods * * @return bool Returns true if validation passes, false otherwise */ protected function validate_payment_access($active_methods) { } /** * Load Payment Content * * @since 2.4 * * @param string $slug_suffix * * @return void */ public function load_payment_content($slug_suffix) { } /** * Save settings via ajax * * @since 2.4 * * @return void */ public function ajax_settings() { } /** * Validate profile settings * * @return bool|WP_Error */ private function profile_validate() { } /** * Validate store settings * * @return bool|WP_Error */ private function store_validate() { } /** * Validate payment settings * * @since 2.4 * * @return bool|WP_Error */ private function payment_validate() { } /** * Save store settings * * @return void */ public function insert_settings_info() { } /** * Dokan Get Category Format * * @since 1.0 * * @return array */ public function get_dokan_categories() { } /** * Get proper heading for payments of vendor dashboard payment settings * * @since 3.4.3 * * @param string $slug * @param string $heading * * @return string */ private function get_payment_heading($slug, $heading) { } /** * Check if a seller is connected to a payment method * * @since 3.5.1 * * @param $payment_method_id * @param $seller_id * * @return bool */ public function is_seller_connected($payment_method_id, $seller_id) { } /** * Get payment method details from the method keys * * @since 3.4.3 * * @param $method_keys * * @return array */ private function get_payment_methods($method_keys) { } /** * Get Method title to show in frontend * * @since 3.6.1 * * @return string */ public function get_method_frontend_title($title, $method) { } } /** * Dokan Dashboard Withdraw class * * @since 2.4 */ class Withdraw { /** * Current status * * @var null|string */ protected $current_status = null; /** * Error bag * * @var null|\WP_Error; */ protected $errors = null; /** * Load Automatically When class initiate * * Trigger all actions * * @since 2.4 */ public function __construct() { } /** * Add error to error bag * * @since 3.0.0 * * @param string $message * @param string $code */ public function add_error($message, $code = 'dokan_vendor_dashboard_template_withdraw_error') { } /** * Get current withdraw status * * @since 3.0.0 * * @return string */ public function get_current_status() { } /** * Handle Withdraw form submission * * @return void */ public function handle_request() { } /** * Handle withdraw cancellation request * * @since 3.0.0 * * @return void */ protected function handle_cancel_request() { } /** * Show Seller Enable Error Message * * @since 2.4 * * @return void */ public function show_seller_enable_message() { } /** * Print error messages * * @since 3.0.0 * * @param string|array $messages * @param bool $deleted * * @return void */ protected function show_error_messages($messages, $deleted = false) { } /** * Print warning message * * @since 3.0.0 * * @param string $message * @param bool $deleted * * @return void */ protected function show_warning_message($message, $deleted = false) { } /** * Dokan Withdraw header Template render * * @since 2.4 * * @return void */ public function withdraw_header_render() { } /** * Render WIthdraw Status Filter template * * @since 2.4 * * @return void */ public function withdraw_status_filter() { } /** * Get Withdraw form and listing * * @since 2.4 * @since 3.3.1 Display only in `withdraw-requests` endpoint. * * @return void */ public function withdraw_form_and_listing() { } /** * List withdraw request for a user for dashboard. * * @since 3.3.1 * * @param int $user_id * * @return void */ public function withdraw_requests($user_id) { } /** * Show alert messages * * @return void */ public function show_alert_messages() { } /** * Print the approved user withdraw requests * * @since 3.3.1 * * @param int $user_id * * @return void */ public function user_approved_withdraws($user_id) { } /** * Print the cancelled user withdraw requests * * @param int $user_id * * @return void */ public function user_cancelled_withdraws($user_id) { } /** * Display dashboard content * * @since 3.3.1 * * @return void */ public function withdraw_dashboard_layout_display() { } /** * Include withdraw request popup content * * @since 3.3.1 * * @return void */ public function include_withdraw_popup_templates() { } /** * Populate withdraw request popup content. * * @since 3.3.1 * * @return void */ public function withdraw_request_popup_form_content() { } /** * Get pending withdraw request in dashboard listing. * * @since 3.3.1 * * @return void */ public function pending_withdraw_requests() { } /** * Display withdraw listing. * * @since 3.3.1 * * @param array $query_vars * * @return void */ public function display_request_listing($query_vars) { } /** * Set withdraw menu as active. * * @since 3.3.1 * * @param string $active_menu * @param $request * @param array $active * * @return string */ public function active_dashboard_nav_menu($active_menu, $request, $active) { } /** * Redirect to vendor dashboard. * * @since 3.3.1 * * @return void */ public function redirect_to_dashboard() { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container { interface ContainerAwareInterface { public function getContainer(): \WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface; public function setContainer(\WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface $container): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider { interface ServiceProviderInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface { public function getIdentifier(): string; public function provides(string $id): bool; public function register(): void; public function setIdentifier(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container { trait ContainerAwareTrait { /** * @var ?DefinitionContainerInterface */ protected $container; public function setContainer(\WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface $container): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface { } public function getContainer(): \WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider { abstract class AbstractServiceProvider implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var string */ protected $identifier; public function getIdentifier(): string { } public function setIdentifier(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface { } } } namespace WeDevs\Dokan\DependencyManagement { /** * Base class for the service providers used to register classes in the container. * * See the documentation of the original class this one is based on (https://container.thephpleague.com/4.x/service-providers) * for basic usage details. What this class adds is: * Note that `AbstractInterfaceServiceProvider` likely serves as a better base class for service providers * tasked with registering classes that implement interfaces. * * @since 3.13.0 */ abstract class BaseServiceProvider extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\AbstractServiceProvider { protected $services = []; protected $tags = []; /** * {@inheritDoc} * * Check if the service provider can provide the given service alias. * * @param string $alias The service alias to check. * @return bool True if the service provider can provide the service, false otherwise. */ public function provides(string $alias): bool { } /** * Register a class in the container and add tags for all the interfaces it implements. * * This also updates the `$this->provides` property with the interfaces provided by the class, and ensures * that the property doesn't contain duplicates. * * @param string $id Entry ID (typically a class or interface name). * @param mixed|null $concrete Concrete entity to register under that ID, null for automatic creation. * @param bool $shared Whether to register the class as shared (`get` always returns the same instance) * or not. * * @return DefinitionInterface */ protected function add_with_implements_tags(string $id, $concrete = null, bool $shared = false): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } /** * Register a shared class in the container and add tags for all the interfaces it implements. * * @param string $id Entry ID (typically a class or interface name). * @param mixed|null $concrete Concrete entity to register under that ID, null for automatic creation. * * @return DefinitionInterface */ protected function share_with_implements_tags(string $id, $concrete = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } /** * Adds tags to the given definition. * * @param DefinitionInterface $definition The definition to which tags will be added. * @param array $tags An array of tags to add to the definition. * * @return void */ protected function add_tags(\WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface $definition, $tags) { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider { interface BootableServiceProviderInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface { /** * Method will be invoked on registration of a service provider implementing * this interface. Provides ability for eager loading of Service Providers. * * @return void */ public function boot(): void; } } namespace WeDevs\Dokan\DependencyManagement { /** * Base class for the service providers used to register classes in the container or/and to register the other service providers. * * See the documentation of the original class this one is based on (https://container.thephpleague.com/4.x/service-providers) * for basic usage details. What this class adds is: * Note that `AbstractInterfaceServiceProvider` likely serves as a better base class for service providers * tasked with registering classes that implement interfaces. * * @since 3.13.0 */ abstract class BootableServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\BootableServiceProviderInterface { } } namespace WeDevs\Dokan\ThirdParty\Packages\Psr\Container { /** * Describes the interface of a container that exposes methods to read its entries. */ interface ContainerInterface { /** * Finds an entry of the container by its identifier and returns it. * * @param string $id Identifier of the entry to look for. * * @throws NotFoundExceptionInterface No entry was found for **this** identifier. * @throws ContainerExceptionInterface Error while retrieving the entry. * * @return mixed Entry. */ public function get(string $id); /** * Returns true if the container can return an entry for the given identifier. * Returns false otherwise. * * `has($id)` returning true does not mean that `get($id)` will not throw an exception. * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. * * @param string $id Identifier of the entry to look for. * * @return bool */ public function has(string $id): bool; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container { interface DefinitionContainerInterface extends \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerInterface { public function add(string $id, $concrete = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addServiceProvider(\WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface $provider): self; public function addShared(string $id, $concrete = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function extend(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function getNew($id); public function inflector(string $type, ?callable $callback = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface; } class Container implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface { /** * @var boolean */ protected $defaultToShared = false; /** * @var DefinitionAggregateInterface */ protected $definitions; /** * @var ServiceProviderAggregateInterface */ protected $providers; /** * @var InflectorAggregateInterface */ protected $inflectors; /** * @var ContainerInterface[] */ protected $delegates = []; public function __construct(?\WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionAggregateInterface $definitions = null, ?\WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderAggregateInterface $providers = null, ?\WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorAggregateInterface $inflectors = null) { } public function add(string $id, $concrete = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addShared(string $id, $concrete = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function defaultToShared(bool $shared = true): \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerInterface { } public function extend(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addServiceProvider(\WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface $provider): \WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface { } /** * @template RequestedType * * @param class-string|string $id * * @return RequestedType|mixed */ public function get($id) { } /** * @template RequestedType * * @param class-string|string $id * * @return RequestedType|mixed */ public function getNew($id) { } public function has($id): bool { } public function inflector(string $type, ?callable $callback = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { } public function delegate(\WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerInterface $container): self { } protected function resolve($id, bool $new = false) { } } } namespace WeDevs\Dokan\DependencyManagement { /** * This class extends the original League's Container object by adding some functionality * that we need for Dokan. * * @since 3.13.0 */ class Container extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Container { } /** * Class ContainerException. * Used to signal error conditions related to the dependency injection container. * * @since 3.13.0 */ class ContainerException extends \Exception { /** * Create a new instance of the class. * * @param null $message The exception message to throw. * @param int $code The error code. * @param \Exception|null $previous The previous throwable used for exception chaining. */ public function __construct($message = null, $code = 0, \Exception $previous = null) { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument { interface ArgumentResolverInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface { public function resolveArguments(array $arguments): array; public function reflectArguments(\ReflectionFunctionAbstract $method, array $args = []): array; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition { interface DefinitionInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface { public function addArgument($arg): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addArguments(array $args): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addMethodCall(string $method, array $args = []): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addMethodCalls(array $methods = []): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addTag(string $tag): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function getAlias(): string; public function getConcrete(); public function hasTag(string $tag): bool; public function isShared(): bool; public function resolve(); public function resolveNew(); public function setAlias(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function setConcrete($concrete): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function setShared(bool $shared): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument { trait ArgumentResolverTrait { public function resolveArguments(array $arguments): array { } public function reflectArguments(\ReflectionFunctionAbstract $method, array $args = []): array { } abstract public function getContainer(): \WeDevs\Dokan\ThirdParty\Packages\League\Container\DefinitionContainerInterface; } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition { class Definition implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverInterface, \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverTrait; use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var string */ protected $alias; /** * @var mixed */ protected $concrete; /** * @var boolean */ protected $shared = false; /** * @var array */ protected $tags = []; /** * @var array */ protected $arguments = []; /** * @var array */ protected $methods = []; /** * @var mixed */ protected $resolved; /** * @param string $id * @param mixed|null $concrete */ public function __construct(string $id, $concrete = null) { } public function addTag(string $tag): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function hasTag(string $tag): bool { } public function setAlias(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function getAlias(): string { } public function setShared(bool $shared = true): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function isShared(): bool { } public function getConcrete() { } public function setConcrete($concrete): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addArgument($arg): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addArguments(array $args): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addMethodCall(string $method, array $args = []): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addMethodCalls(array $methods = []): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function resolve() { } public function resolveNew() { } /** * @param callable $concrete * @return mixed */ protected function resolveCallable(callable $concrete) { } protected function resolveClass(string $concrete): object { } protected function invokeMethods(object $instance): object { } public static function normaliseAlias(string $alias): string { } } } namespace WeDevs\Dokan\DependencyManagement { /** * An extension of the definition class that replaces constructor injection with method injection. */ class Definition extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\Definition { /** * The standard method that we use for dependency injection. */ public const INJECTION_METHOD = 'init'; /** * Resolve a class using method injection instead of constructor injection. * * @param string $concrete The concrete to instantiate. * * @return object */ protected function resolveClass(string $concrete): object { } /** * Invoke methods on resolved instance, including 'init'. * * @param object $instance The concrete to invoke methods on. * * @return object */ protected function invokeMethods($instance): object { } /** * Invoke the 'init' method on a resolved object. * * Constructor injection causes backwards compatibility problems * so we will rely on method injection via an internal method. * * @param object $instance The resolved object. * @return void */ private function invokeInit($instance) { } /** * Forget the cached resolved object, so the next time it's requested * it will be resolved again. */ public function forgetResolved() { } } } namespace WeDevs\Dokan\DependencyManagement\Providers { /** * Admin Dashboard API Service Provider * * @since 4.1.0 */ class AdminDashboardServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. * * @var array */ protected $tags = ['admin-dashboard-service']; /** * Services to register * * @var array */ protected $services = [ \WeDevs\Dokan\Admin\Dashboard\Dashboard::class, \WeDevs\Dokan\Admin\Dashboard\LegacySwitcher::class, \WeDevs\Dokan\Admin\Dashboard\Pages\Modules::class, \WeDevs\Dokan\Admin\Dashboard\Pages\Tools::class, \WeDevs\Dokan\Admin\Dashboard\Pages\Status::class, \WeDevs\Dokan\Admin\Dashboard\Pages\ProFeatures::class, \WeDevs\Dokan\Admin\Dashboard\Pages\Withdraw::class, \WeDevs\Dokan\Admin\Dashboard\Pages\Vendors::class, \WeDevs\Dokan\Admin\Dashboard\Pages\ReverseWithdrawal::class, // Added ReverseWithdrawal page service \WeDevs\Dokan\Admin\Dashboard\Pages\Extensions::class, ]; /** * Register the services. * * @return void */ public function register(): void { } } class AdminServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ public const TAG = 'admin-service'; protected $services = [self::TAG, \WeDevs\Dokan\Admin\Status\Status::class]; /** * {@inheritDoc} * * Check if the service provider can provide the given service alias. * * @param string $alias The service alias to check. * @return bool True if the service provider can provide the service, false otherwise. */ public function provides(string $alias): bool { } /** * Register the classes. */ public function register(): void { } } class AdminSetupGuideServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ protected $tags = ['admin-setup-guide-service']; /** * Services to register. */ protected $services = [\WeDevs\Dokan\Admin\OnboardingSetup\AdminSetupGuide::class, \WeDevs\Dokan\Admin\OnboardingSetup\Steps\BasicStep::class, \WeDevs\Dokan\Admin\OnboardingSetup\Steps\CommissionStep::class, \WeDevs\Dokan\Admin\OnboardingSetup\Steps\WithdrawStep::class, \WeDevs\Dokan\Admin\OnboardingSetup\Steps\AppearanceStep::class]; /** * Register the classes. */ public function register(): void { } } /** * Class AjaxServiceProvider * * Registers the Ajax service with the dependency container and adds * appropriate tags to the service definition. */ class AjaxServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tags used to identify the service in the container. * * @var array */ protected $tags = ['ajax-service']; /** * List of services provided by this provider. * * @var array */ protected $services = [\WeDevs\Dokan\Ajax::class]; /** * Register the Ajax class in the container and add the corresponding tags. * * @return void */ public function register(): void { } } class AnalyticsServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tags for services added to the container. */ protected $tags = ['analytics-service']; protected $services = [\WeDevs\Dokan\Analytics\Reports\Orders\Stats\ScheduleListener::class, \WeDevs\Dokan\Analytics\Reports\Orders\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Orders\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Products\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Products\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Variations\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Variations\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Categories\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\DataStoreModifier::class, \WeDevs\Dokan\Analytics\Reports\CacheKeyModifier::class, \WeDevs\Dokan\Analytics\Reports\Taxes\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Taxes\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Coupons\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Coupons\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Customers\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Customers\Stats\QueryFilter::class, \WeDevs\Dokan\Analytics\Reports\Stock\QueryFilter::class, \WeDevs\Dokan\Analytics\Assets::class, \WeDevs\Dokan\Analytics\VendorDashboardManager::class, \WeDevs\Dokan\Analytics\Reports\DataStoreCacheModifier::class, \WeDevs\Dokan\Analytics\Settings::class]; /** * Register the classes. */ public function register(): void { } } /** * Captcha Service Provider * * Registers the Captcha Manager into Dokan's DI container. */ class CaptchaServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { protected $tags = ['captcha-services']; protected $services = [\WeDevs\Dokan\Captcha\Manager::class, \WeDevs\Dokan\Captcha\Providers\GoogleRecaptchaV3Provider::class, \WeDevs\Dokan\Captcha\Providers\CloudflareTurnstileProvider::class]; /** * Register the classes. */ public function register(): void { } } /** * Class CliServiceProvider * * Registers the WP-CLI command registry with the dependency container and tags * it so it is only resolved while running under WP-CLI. * * @since 5.0.18 */ class CliServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tags used to identify the service in the container. * * @var array */ protected $tags = ['cli-service']; /** * List of services provided by this provider. * * @var array */ protected $services = [\WeDevs\Dokan\CLI\Manager::class]; /** * Register the CLI Manager in the container and add the corresponding tags. * * @return void */ public function register(): void { } } class CommissionServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ protected $tags = ['commission-service']; protected $services = [\WeDevs\Dokan\Commission\OrderCommission::class, \WeDevs\Dokan\Commission\OrderLineItemCommission::class, \WeDevs\Dokan\Commission\OrderRefundCommission::class, \WeDevs\Dokan\Commission\ProductCommission::class, \WeDevs\Dokan\Commission\Calculator::class, \WeDevs\Dokan\Order\VendorBalanceUpdateHandler::class]; /** * Register the classes. */ public function register(): void { } } class CommonServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ protected $tags = ['common-service']; protected $services = [\WeDevs\Dokan\Withdraw\Hooks::class, \WeDevs\Dokan\Product\Hooks::class, \WeDevs\Dokan\ProductCategory\Hooks::class, \WeDevs\Dokan\Upgrade\Hooks::class, \WeDevs\Dokan\Vendor\Hooks::class, \WeDevs\Dokan\Vendor\UserSwitch::class, \WeDevs\Dokan\CacheInvalidate::class, \WeDevs\Dokan\Shipping\Hooks::class, \WeDevs\Dokan\Privacy::class, \WeDevs\Dokan\VendorNavMenuChecker::class, \WeDevs\Dokan\Commission\RecalculateCommissions::class, \WeDevs\Dokan\Order\RefundHandler::class, \WeDevs\Dokan\Exceptions\Handler::class, \WeDevs\Dokan\Shortcodes\FullWidthVendorLayout::class, \WeDevs\Dokan\Vendor\ApiMeta::class, \WeDevs\Dokan\Abilities\ProductAbilityScope::class, \WeDevs\Dokan\Abilities\OrderAbilityScope::class, \WeDevs\Dokan\Abilities\DokanAbilityRegistrar::class]; /** * Register the classes. */ public function register(): void { } } /** * Class FrontendServiceProvider * * Registers and provides frontend-related services to the dependency container. * * @package WeDevs\Dokan\DependencyManagement\Providers */ class FrontendServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { protected $tags = ['frontend-service']; /** * List of service identifiers provided by this provider. * * @var array */ protected $services = [\WeDevs\Dokan\Vendor\StoreListsFilter::class, \WeDevs\Dokan\ThemeSupport\Manager::class]; /** * Register the frontend services with the dependency container. * * @return void */ public function register(): void { } } class IntelligenceServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tags for services added to the container. */ protected $tags = ['intelligence-service']; protected $services = [\WeDevs\Dokan\Intelligence\Assets::class, \WeDevs\Dokan\Intelligence\Manager::class, \WeDevs\Dokan\Intelligence\Admin\Settings::class, \WeDevs\Dokan\Intelligence\Services\Providers\OpenAI::class, \WeDevs\Dokan\Intelligence\Services\Providers\Gemini::class, \WeDevs\Dokan\Intelligence\Services\Models\GeminiTwoDotFiveFlash::class, \WeDevs\Dokan\Intelligence\Services\Models\GeminiTwoDotFivePro::class, \WeDevs\Dokan\Intelligence\Services\Models\GeminiTwoDotFiveFlashLite::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFiveDotFourMini::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFiveMini::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFiveDotFourNano::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFourDotOneMini::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFiveNano::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFourOMini::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFourO::class, \WeDevs\Dokan\Intelligence\Services\Models\OpenAIChatGPTFourO::class]; /** * Register the classes. */ public function register(): void { } } class ModelServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ public const TAG = 'ajax-service'; protected $services = [\WeDevs\Dokan\Models\VendorBalance::class, \WeDevs\Dokan\Models\VendorOrderStats::class, \WeDevs\Dokan\Models\AdminDashboardStats::class, \WeDevs\Dokan\Models\DataStore\VendorBalanceStore::class, \WeDevs\Dokan\Models\DataStore\VendorOrderStatsStore::class, \WeDevs\Dokan\Models\DataStore\AdminDashboardStatsStore::class]; /** * {@inheritDoc} * * Check if the service provider can provide the given service alias. * * @param string $alias The service alias to check. * @return bool True if the service provider can provide the service, false otherwise. */ public function provides(string $alias): bool { } /** * Register the classes. */ public function register(): void { } } /** * ServiceProvider Class * * Manages the registration and booting of Dokan's core services within the container. * This service provider handles the core services with the Dokan's * dependency injection container. * * @since 3.13.0 */ class ServiceProvider extends \WeDevs\Dokan\DependencyManagement\BootableServiceProvider { /** * Tag for services added to the container. */ public const TAG = 'container-service'; protected $services = ['product_block' => \WeDevs\Dokan\Blocks\ProductBlock::class, 'pageview' => \WeDevs\Dokan\PageViews::class, 'seller_wizard' => \WeDevs\Dokan\Vendor\SetupWizard::class, 'core' => \WeDevs\Dokan\Core::class, 'scripts' => \WeDevs\Dokan\Assets::class, 'email' => \WeDevs\Dokan\Emails\Manager::class, 'vendor' => \WeDevs\Dokan\Vendor\Manager::class, 'product' => \WeDevs\Dokan\Product\Manager::class, 'shortcodes' => \WeDevs\Dokan\Shortcodes\Shortcodes::class, 'registration' => \WeDevs\Dokan\Registration::class, 'order' => \WeDevs\Dokan\Order\Manager::class, 'order_controller' => \WeDevs\Dokan\Order\Controller::class, 'api' => \WeDevs\Dokan\REST\Manager::class, 'withdraw' => \WeDevs\Dokan\Withdraw\Manager::class, 'dashboard' => \WeDevs\Dokan\Dashboard\Manager::class, 'commission' => \WeDevs\Dokan\Commission::class, 'fees' => \WeDevs\Dokan\Fees::class, 'customizer' => \WeDevs\Dokan\Customizer::class, 'upgrades' => \WeDevs\Dokan\Upgrade\Manager::class, 'product_sections' => \WeDevs\Dokan\ProductSections\Manager::class, 'reverse_withdrawal' => \WeDevs\Dokan\ReverseWithdrawal\ReverseWithdrawal::class, 'dummy_data_importer' => \WeDevs\Dokan\DummyData\Importer::class, 'catalog_mode' => \WeDevs\Dokan\CatalogMode\Controller::class, 'bg_process' => \WeDevs\Dokan\BackgroundProcess\Manager::class, 'frontend_manager' => \WeDevs\Dokan\Frontend\Frontend::class, 'rewrite' => \WeDevs\Dokan\Rewrites::class, 'widgets' => \WeDevs\Dokan\Widgets\Manager::class, 'admin_notices' => \WeDevs\Dokan\Admin\Notices\Manager::class, 'tracker' => \WeDevs\Dokan\Tracker::class, 'product_editor' => \WeDevs\Dokan\ProductEditor\FormSchema::class]; /** * @inheritDoc * * @return void */ public function boot(): void { } /** * {@inheritDoc} * * Check if the service provider can provide the given service alias. * * @param string $alias The service alias to check. * @return bool True if the service provider can provide the service, false otherwise. */ public function provides(string $alias): bool { } /** * Register the classes. */ public function register(): void { } } class UtilsServiceProvider extends \WeDevs\Dokan\DependencyManagement\BaseServiceProvider { /** * Tag for services added to the container. */ protected $tags = ['utils']; protected $services = [\WeDevs\Dokan\Utilities\AdminSettings::class]; /** * Register the classes. */ public function register(): void { } } } namespace WeDevs\Dokan\DummyData { /** * Dokan dummy data importer class. * * @since 3.6.2 */ class Importer extends \WC_Product_Importer { /** * Created or existing vendor id * * @var int */ private $vendor_id = null; public function __construct() { } /** * Create and return dummy vendor or if exists return the existing vendor * * @since 3.6.2 * * @param array $data * * @return object|Vendor instance */ public function create_dummy_vendor($data) { } /** * Creates dummy vendors and products. * * @since 3.6.2 * * @param int $vendor_id * @param array $products * * @return array */ public function create_dummy_products_for_vendor($vendor_id, $products) { } /** * Formats category / tags ids for products * * @since 3.6.2 * * @param array $value * * @return array */ private function formate_product_categories_or_tags($value, $taxonomy, $category_or_tag) { } /** * Formats string by a separator * * @since 3.6.2 * * @param string $data * * @param string $separator * * @return array */ private function formate_string_by_separator($data = '', $separator = ',') { } /** * Process importer. * * Do not import products with IDs or SKUs that already exist if option * update existing is false, and likewise, if updating products, do not * process rows which do not exist if an SKU is provided. * * @since 3.6.2 * * @return array */ public function import() { } /** * Check if the product is from my store * * @param int|WC_Product $product * * @return bool */ private function is_my_product($product) { } /** * Remove all dummy data ( products and vendors ) that has 'dokan_dummy_data' meta key * * @since 3.6.2 * * @return string */ public function clear_all_dummy_data() { } /** * Delete orders data of a dummy vendors from database. * * @since 3.6.2 * * @param array $args * * @return void */ public function delete_dummy_vendor_orders($args) { } } } namespace WeDevs\Dokan\Emails { /** * Customer Email to vendor from contact form widget. * * @class Dokan_Email_Contact_Seller * @version 2.6.8 * @author weDevs * @extends WC_Email */ class ContactSeller extends \WC_Email { /** * Reply email * * @since 3.2.15 * * @var string */ private $from_email; /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger this email. */ public function trigger($seller_email, $contact_name, $contact_email, $contact_message) { } /** * Get the from address for outgoing emails. * * @return string */ public function get_from_address($from_email = '') { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialize settings form fields. */ public function init_form_fields() { } } /** * Dokan email handler class * * @package Dokan */ class Manager { /** * Load autometically when class initiate */ public function __construct() { } /** * Get from name for email. * * @access public * @return string */ public function get_from_name() { } /** * Get from email address. * * @access public * @return string */ public function get_from_address() { } /** * Get admin email address * * @return string */ public function admin_email() { } /** * Get user agent string * * @return string */ public function get_user_agent() { } /** * Replace currency HTML entities with symbol * * @param string $amount * * @return string */ public function currency_symbol($amount) { } /** * Add Dokan Email classes in WC Email * * @since 2.6.8 * * @param array $wc_emails * * @return $wc_emails */ public function load_dokan_emails($wc_emails) { } /** * Set template override directory for Dokan Emails * * @since 2.6.8 * * @param string $template_dir * * @param string $template * * @return string */ public function set_email_template_directory($template_dir, $template) { } /** * Register Dokan Email actions for WC * * @since 2.6.8 * * @param array $actions * * @return $actions */ public function register_email_actions($actions) { } /** * Send email to seller from the seller contact form * * @param string $seller_email * @param string $from_name * @param string $from_email * @param string $message * * @return void */ public function contact_seller($seller_email, $from_name, $from_email, $message) { } /** * Send seller email notification when a new refund request is made * * @param WP_User $seller_mail * @param int $order_id * @param object $refund * * @return void */ public function dokan_refund_seller_mail($seller_mail, $order_id, $status, $amount, $refund_reason) { } /** * Send admin email notification when a new refund request is cancle * * @param string $seller_mail * @param int $order_id * @param int $refund_id * * @return @void */ public function dokan_refund_request($order_id) { } /** * Prepare body for withdraw email * * @param string $body * @param WP_User $user * @param float $amount * @param string $method * @param string $note * * @return string */ public function prepare_withdraw($body, $user, $amount, $method, $note = '') { } /** * Send admin email notification when a new withdraw request is made * * @param WP_User $user * @param float $amount * @param string $method */ public function new_withdraw_request($user, $amount, $method) { } /** * Send email to user once a withdraw request is approved * * @param int $user_id * @param float $amount * @param string $method * * @return 3.0.0 */ public function withdraw_request_approve($user_id, $amount, $method) { } /** * Send email to user once a order has been cancelled * * @param int $user_id * @param float $amount * @param string $method * @param string $note * * @since 3.0.0 */ public function withdraw_request_cancel($user_id, $amount, $method, $note = '') { } /** * Send email to admin once a new seller registered * * @param int $seller_id * * @return void */ public function new_seller_registered_mail($seller_id) { } /** * Send email to admin once a product is added * * @param int $product_id * @param string $status * * @return void */ public function new_product_added($product_id, $status = 'pending') { } /** * Send email to seller once a product is published * * @param WP_Post $post * @param WP_User $seller * * @return void */ public function product_published($post, $seller) { } /** * Send the email. * * @access public * * @param mixed $to * @param mixed $subject * @param mixed $message * @param string $headers * @param string $attachments * * @return void */ public function send($to, $subject, $message, $headers = array()) { } } /** * New Product Email. * * An email sent to the admin when a new Product is created by vendor. * * @class Dokan_Email_New_Product * @version 2.6.8 * @author weDevs * @extends WC_Email */ class NewProduct extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $product_id The product ID. */ public function trigger($product_id) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * New Product Email. * * An email sent to the admin when a new Product is created by vendor. * * @class Dokan_Email_New_Product_Pending * @version 2.6.8 * @package Dokan/Classes/Emails * @author weDevs * @extends WC_Email */ class NewProductPending extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $product_id The product ID. */ public function trigger($product_id) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * New Seller Email. * * @version 2.6.6 * @package Dokan/Classes/Emails * @author weDevs * @extends WC_Email */ class NewSeller extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $user_id The user ID. * @param array $shop_info Store info. */ public function trigger($user_id, $shop_info) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * New Product Published Email to vendor. * * An email sent to the vendor when a pending Product is published by admin. * * @class Dokan_Email_Product_Published * @version 2.6.8 * @author weDevs * @extends WC_Email */ class ProductPublished extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param \WP_Post $post The product as post. * @param \WP_User $seller. */ public function trigger($post, $seller) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * Reverse Withdrawal Invoice Email. * * @since 3.5.1 * * @extends WC_Email * * @package WeDevs\Dokan\Emails */ class ReverseWithdrawalInvoice extends \WC_Email { /** * @var \WeDevs\Dokan\Vendor\Vendor|null * * @since 3.5.1 */ protected $seller_info; /** * @var array|null * * @since 3.5.1 * * @see Helper::get_vendor_due_status() */ protected $due_status; /** * Constructor. * * @since 3.5.1 */ public function __construct() { } /** * Get email subject. * * @since 3.5.1 * * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.5.1 * * @return string */ public function get_default_heading() { } /** * Default content to show below main email content. * * @since 3.5.1 * * @return string */ public function get_default_additional_content() { } /** * Trigger this email. * * @since 3.5.1 * * @param int $vendor_id * @param array $due_status * * @return void */ public function trigger($vendor_id, $due_status = null) { } /** * Get vendor email address * * @since 3.5.1 * * @return string|null */ public function get_recipient() { } /** * Get content html. * * @since 3.5.1 * * @return string */ public function get_content_html() { } /** * Get content plain. * * @since 3.5.1 * * @return string */ public function get_content_plain() { } /** * Initialize settings form fields. * * @since 3.5.1 * * @return void */ public function init_form_fields() { } } /** * Completed Order Email. * * An email sent to the admin when a order is completed for. * * @class VendorCompletedOrder * @version 3.2.2 * @package Dokan/Classes/Emails * @author weDevs * @extends WC_Email */ class VendorCompletedOrder extends \WC_Email { public $order_info; /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.2.2 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.2.2 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $order_id The Order ID. * @param array $order. */ public function trigger($order_id, $order = false) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } /** * Prevent sub-order email for admin * * @param $bool * @param $order * * @return bool */ public function prevent_sub_order_admin_email($bool, $order) { } } /** * New Order Email. * * An email sent to the admin when a new order is received/paid for. * * @class VendorNewOrder * @version 2.6.8 * @package Dokan/Classes/Emails * @author weDevs * @extends WC_Email */ class VendorNewOrder extends \WC_Email { public $order_info; /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $order_id The Order ID. * @param array $order. */ public function trigger($order_id, $order = false) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } /** * Prevent sub-order email for admin * * @param $bool * @param $order * * @return bool */ public function prevent_sub_order_admin_email($bool, $order) { } } /** * Send email to vendor when a product is reviewed * * @since 3.9.2 * * @class Dokan_Email_Vendor_Product_Review * * @author weDevs * * @extends WC_Email */ class VendorProductReview extends \WC_Email { /** * Reply email * * @since 3.9.2 * * @var string */ private $from_email; /** * Constructor. * * @since 3.9.2 */ public function __construct() { } /** * Get the email subject. * * @since 3.9.2 * * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.9.2 * * @return string */ public function get_default_heading() { } /** * Trigger this email. * * @since 3.9.2 * * @param int $comment_id * * @return void */ public function trigger($comment_id) { } /** * Get the from address for outgoing emails. * * @since 3.9.2 * * @return string */ public function get_from_address($from_email = '') { } /** * Get content html. * * @since 3.9.2 * * @return string */ public function get_content_html() { } /** * Get content plain. * * @since 3.9.2 * * @return string */ public function get_content_plain() { } /** * Initialize settings form fields. * * @since 3.9.2 */ public function init_form_fields() { } } /** * New Product Email. * * An email sent to the admin when a new Product is created by vendor. * * @class Dokan_Vendor_Withdraw_Request * @version 2.6.8 * @author weDevs * @extends WC_Email */ class VendorWithdrawRequest extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param int $user_id User ID. * @param mixed $amount Withdrawal amount. * @param string $method Withdrawal method. * @param int $id Withdrawal id, */ public function trigger($withdraw) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * New Product Email. * * An email sent to the admin when a new Product is created by vendor. * * @class Dokan_Email_Withdraw_Approved * @version 2.6.8 * @author weDevs * @extends WC_Email */ class WithdrawApproved extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw . */ public function trigger($withdraw) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } /** * Withdraw Request Cancelled * * An email sent to the vendor when a withdrawal request is cancelled by admin. * * @class Dokan_Email_Withdraw_Cancelled * @version 2.6.8 * @author weDevs * @extends WC_Email */ class WithdrawCancelled extends \WC_Email { /** * Constructor. */ public function __construct() { } /** * Get email subject. * * @since 3.1.0 * @return string */ public function get_default_subject() { } /** * Get email heading. * * @since 3.1.0 * @return string */ public function get_default_heading() { } /** * Trigger the sending of this email. * * @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw. */ public function trigger($withdraw) { } /** * Get content html. * * @access public * @return string */ public function get_content_html() { } /** * Get content plain. * * @access public * @return string */ public function get_content_plain() { } /** * Initialise settings form fields. */ public function init_form_fields() { } } } namespace WeDevs\Dokan\Exceptions { class DokanException extends \Exception { /** * Error code * * @since 2.9.16 * * @var string */ protected $error_code = ''; /** * Class constructor * * @since 2.9.16 * @since 3.0.0 $error_code can be instance of WP_Error which is * useful for multiple error codes and messages in * a single WP_Error instance. * * @param string|\WP_Error $error_code Error code string or WP_Error * @param string $message * @param int $status_code */ public function __construct($error_code, $message = '', $status_code = 422) { } /** * Get error code * * @since 2.9.16 * * @return string */ final public function get_error_code() { } /** * Get error message * * @since 2.9.16 * * @return string */ final public function get_message() { } /** * Get error status code * * @since 2.9.16 * * @return int */ final public function get_status_code() { } } /** * Handles application-level exceptions and errors in a unified way. * * This class registers shutdown and error handlers to catch critical or fatal errors. * It also displays admin notices in case a module is forcefully deactivated. */ class Handler implements \WeDevs\Dokan\Contracts\Hookable { /** * Registers hooks for error handling and admin notices. * * @return void */ public function register_hooks(): void { } /** * Conditionally deactivates the Follow Store module based on error content. * * @see https://github.com/getdokan/dokan-pro/issues/4401 * * @param array $error { * Error details. * * @type string $message Error message text. * @type int $type Error type code. * @type string $file File where the error occurred. * @type int $line Line number of the error. * } * * @return void */ private function maybe_deactivate_store_follow_module(array $error): void { } /** * Adds an admin notice when the Follow Store module is forcefully deactivated. * * @param array $notices Existing Dokan admin notices. * * @return array Updated list of notices including the deactivation message. */ public function dokan_store_follow_module_deactivation_notice(array $notices): array { } /** * Deal with WooCommerce Shutdown. * * @param array $error * @return void */ public function on_woocommerce_shutdown($error) { } } } namespace WeDevs\Dokan { /** * Fake Mailer Class * * @since 3.8.0 Moved this class from includes/wc-functions.php file */ class FakeMailer { public function Send() { } } class Fees { /** * Class constructor * Moved from dokan()->commission in version in 3.14.0 * * @since 3.14.0 * * @return void */ public function __construct() { } /** * Hide extra meta data * * @since 2.9.21 * * @param array * * @return array */ public function hide_extra_data($formatted_meta) { } /** * Calculate gateway fee * Moved from dokan()->commission in version in 3.14.0 * * @since 2.9.21 * * @param int $order_id * * @return void */ public function calculate_gateway_fee($order_id) { } /** * Get processing fee * * @since 3.0.4 * * @param WC_Order $order * * @return float */ public function get_processing_fee($order) { } /** * Get shipping fee recipient * Move from commission.php in version 3.14.0 * * @since 2.9.21 * @since 3.4.1 introduced the shipping fee recipient hook * * @param WC_Order|int $order * * @return string */ public function get_shipping_fee_recipient($order) { } /** * Get tax fee recipient * Move from commission.php in version 3.14.0 * * @since 2.9.21 * @since 3.4.1 introduced the tax fee recipient hook * * @param WC_Order|int $order * * @return string|WP_Error */ public function get_tax_fee_recipient($order) { } /** * Get shipping tax fee recipient. * Move from commission.php in version 3.14.0 * * @since 3.7.19 * * @param WC_Order $order Order. * * @return string */ public function get_shipping_tax_fee_recipient($order): string { } /** * Get total shipping tax refunded for the order. * Move from commission.php in version 3.14.0 * * @since 3.7.19 * * @param WC_Order $order Order. * * @return float */ public function get_total_shipping_tax_refunded(\WC_Order $order): float { } } } namespace WeDevs\Dokan\Frontend { /** * Frontend Manager * * @since 3.7.21 * * @property BecomeAVendor $become_a_vendor Instance of Commission class */ class Frontend { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Shortcodes container * * @since 3.7.21 */ public function __construct() { } /** * Set controllers * * @since 3.7.21 * * @return void */ private function set_controllers() { } } } namespace WeDevs\Dokan\Frontend\MyAccount { /** * Dokan Become Vendor Class. * * @since 3.7.21 * * @package dokan */ class BecomeAVendor { /** * Class Constructor. * * @since 3.7.21 */ public function __construct() { } /** * Init Hooks Method. * * @since 3.7.21 * * @return void */ public function init_hooks() { } /** * Remove Account Update Feature from Dokan Pro. * * @since 3.7.21 * * @return void */ public function remove_account_update_feature_from_dokan_pro() { } /** * Become A Seller Form Handler. * * @since 3.7.21 * * @return void */ public function become_a_seller_form_handler() { } /** * Render Become A Vendor Section. * * @since 3.7.21 * * @return void */ public function render_become_a_vendor_section() { } /** * Load Customer to Vendor Update Form Template. * * @since 3.7.21 * * @return void */ public function load_customer_to_vendor_update_template() { } } } namespace WeDevs\Dokan\Install { /** * Dokan installer class * * @author weDevs */ class Installer { public function do_install() { } /** * Add store name meta key for admin users * * Since we are assuming admin/shop_manager users as vendors by default, and since dokan_store_name meta key is used for * various sql queries, we are assigning dokan_store_name meta key for admin users as well. * * @since 3.7.18 * * @return void */ public function add_store_name_meta_key_for_admin_users() { } /** * Schedule cron jobs * * @since 3.9.2 * * @return void */ private function schedule_cron_jobs() { } /** * Adds plugin installation time. * * @since 3.3.1 * * @return boolean */ public function add_version_info() { } /** * Update WooCommerce mayaccount registration settings * * @since 1.0 * * @return void */ public function woocommerce_settings() { } /** * Update product new style options * * When user first install this plugin * the new product style options changed to new * * @since 2.3 * * @return void */ public function product_design() { } /** * Init dokan user roles * * @since Dokan 1.0 * * @global WP_Roles $wp_roles */ public function user_roles() { } /** * Setup all pages for dokan * * @return void */ public function setup_pages() { } public function create_page($page) { } /** * Create necessary tables * * @since 1.4 * * @return void */ public function create_tables() { } /** * Create withdraw table * * @return void */ public function create_withdraw_table() { } /** * Create order sync table * * @return void */ public function create_sync_table() { } /** * Create Announcement table * * @since 2.1 * * @return void */ public function create_announcement_table() { } /** * Add new table for refund request * * @since 2.4.11 * * @return void */ public function create_refund_table() { } /** * Create vendor-balance table * * @return void */ public function create_vendor_balance_table() { } /** * Create Reverse Withdrawal Table * * @since 3.5.1 * * @return void */ private function create_reverse_withdrawal_table() { } /** * This method will create reverse withdrawal base product * * @since 3.5.1 * * @return void */ private function create_reverse_withdrawal_base_product() { } /** * Show plugin changes from upgrade notice * * @since 2.5.8 */ public static function in_plugin_update_message($args) { } /** * Parse upgrade notice from readme.txt file. * * @since 2.5.8 * * @param string $content * @param string $new_version * * @return string */ private static function parse_update_notice($content, $new_version) { } public function create_dokan_order_stats_table() { } } } namespace WeDevs\Dokan\Intelligence\Admin { class Settings implements \WeDevs\Dokan\Contracts\Hookable { public function register_hooks(): void { } /** * Render AI section in Dokan settings * * @param array $sections * @return array */ public function render_appearance_section(array $sections): array { } /** * Render AI settings fields * * @param array $settings_fields * @return array */ public function render_ai_settings(array $settings_fields): array { } /** * Map REST API classes * * @param array $class_map * @return array */ public function rest_api_class_map(array $class_map): array { } } } namespace WeDevs\Dokan\Intelligence { class Assets implements \WeDevs\Dokan\Contracts\Hookable { public function register_hooks(): void { } /** * Register all scripts * * @return void */ public function register_all_scripts() { } /** * Enqueue AI assets * * @return void */ public function enqueue_ai_assets() { } } class Manager { public function active_engine(string $type = \WeDevs\Dokan\Intelligence\Services\Model::SUPPORTS_TEXT): string { } /** * Get available AI engines. * * @since 4.1.0 * * @param string $type The type of generation to filter engines by (default is Model::SUPPORTS_TEXT). * * @return array */ public function get_engines(string $type = \WeDevs\Dokan\Intelligence\Services\Model::SUPPORTS_TEXT): array { } /** * Get activated AI engine * * @since 4.1.0 * * @param string $type The type of generation to filter engines by (default is Model::SUPPORTS_TEXT). * * @return bool */ public function is_configured(string $type = \WeDevs\Dokan\Intelligence\Services\Model::SUPPORTS_TEXT): bool { } /** * Get available AI providers * * @since 4.1.0 * * @return array< string, AIProviderInterface > */ public function get_providers(): array { } /** * Get provider by ID * * @since 4.1.0 * * @param string $provider_id * * @return AIProviderInterface|null */ public function get_provider(string $provider_id): ?\WeDevs\Dokan\Intelligence\Services\AIProviderInterface { } /** * Get all supported providers for text generation * * @return array< string, AIProviderInterface > */ public function get_text_supported_providers(): array { } /** * Get all supported providers for image generation * * @return array< string, AIProviderInterface > */ public function get_image_supported_providers(): array { } /** * Get all supported providers for selected type * * @param string $type The type of generation to filter providers by (e.g., 'text', 'image'). * * @return array< string, AIProviderInterface > */ protected function get_providers_by_type(string $type): array { } /** * Get the type prefix for the given generation type. * * @param string $type The type of generation (e.g., 'text', 'image', 'video'). * * @return string The prefix for the type. */ public function get_type_prefix(string $type): string { } } } namespace WeDevs\Dokan\Traits { trait VendorAuthorizable { /** * Check if user has vendor permission. * * @since 3.14.11 * * @return bool */ public function check_permission() { } /** * Check whether the current user is authorized to access a vendor store. * * This method determines authorization based on user role: * - Admins: Can access any vendor (including invalid vendor IDs for proper error handling) * - Vendors: Can access only their own store * - Vendor staff: Can access only their assigned vendor store * - Others: Cannot access any vendor store * * @since 4.2.5 * * @param int $vendor_id Vendor user ID. * @param int $user_id Optional. User ID. Defaults to current user. * * @return bool True if authorized, false otherwise. */ public function can_access_vendor_store(int $vendor_id, int $user_id = 0): bool { } /** * Get the vendor/store ID associated with a user. * * This method delegates to VendorUtil::get_vendor_id_for_user(). * It determines the vendor ID based on the user's role: * - Vendors: Returns their own user ID as the vendor ID * - Vendor staff: Returns their parent vendor's ID (stored in user meta) * - Other users: Returns 0 if not associated with any vendor * * @since 4.2.5 * * @param int $user_id Optional. The user ID to get the vendor ID for. Defaults to 0 (current user). * * @return int The vendor/store ID. Returns 0 if the user is not a vendor or vendor staff, * or if vendor ID cannot be determined. */ public function get_vendor_id_for_user(int $user_id = 0): int { } /** * Validate if a user ID represents a valid vendor or vendor staff member. * * This method checks if the given ID belongs to: * - A valid vendor user, or * - A vendor staff member with a valid associated vendor. * * Used for REST API validation callbacks. The validation ensures that: * - The provided value is greater than 0 * - The vendor ID resolved from the value is greater than 0 * * @since 4.2.5 * * @param mixed $value The value to validate (typically a user ID). * @param \WP_REST_Request $request The REST API request object. * @param string $key The parameter key being validated. * * @return bool|\WP_Error True if valid, WP_Error with status 400 if invalid. */ public function validate_store_id($value, $request, $key) { } /** * Check if a user is vendor staff (not a vendor owner). * * @since 4.2.5 * * @param int $user_id User ID to check. * @return bool True if user is vendor staff but not a vendor owner. */ public function is_staff_only(int $user_id): bool { } } } namespace WeDevs\Dokan\REST { /** * Vendor REST Controller for Dokan * * @since 3.14.11 * * @package dokan */ abstract class DokanBaseVendorController extends \WeDevs\Dokan\REST\DokanBaseController { use \WeDevs\Dokan\Traits\VendorAuthorizable; /** * Endpoint base. * * @var string */ protected $rest_base = 'vendor'; } } namespace WeDevs\Dokan\Intelligence\REST { class AIRequestController extends \WeDevs\Dokan\REST\DokanBaseVendorController { /** * Version * * @var string */ protected string $version = 'v1'; /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan'; /** * Route name * * @var string */ protected $rest_base = 'ai/generate'; public function register_routes(): void { } public function get_request_args(): array { } public function handle_request($request) { } } } namespace WeDevs\Dokan\Intelligence\Services { interface AIImageGenerationInterface { /** * Process the image prompt and return the generated image. * * @param string $prompt The input prompt for the AI model. * @param array $args Optional additional data. * @return mixed The generated image from the AI model. */ public function process_image(string $prompt, array $args = []); } /** * Interface for AI Model * * This interface defines the methods that any AI model must implement. * It includes methods to retrieve model details and check capabilities for text and image generation. * * @package WeDevs\Dokan\Intelligence\Services * @since 4.1.0 */ interface AIModelInterface { /** * Get the model ID. * * @return string */ public function get_id(): string; /** * Get the model title. * * @return string */ public function get_title(): string; /** * Get the model description. * * @return string */ public function get_description(): string; /** * Get the model provider ID. * * @return string */ public function get_provider_id(): string; /** * Check if the model can generate text. * * @return bool */ public function supports(string $type): bool; } /** * Interface for AI Provider * * This interface defines the methods that any AI provider must implement. * It includes methods to retrieve provider details, models, and check model types. * * @package WeDevs\Dokan\Intelligence\Services * @since 4.1.0 */ interface AIProviderInterface { /** * Get the provider ID. * * @return string The unique identifier for the AI provider. */ public function get_id(): string; /** * Get the provider title. * * @return string The human-readable name of the AI provider. */ public function get_title(): string; /** * Get the provider description. * * @return string A brief description of the AI provider. */ public function get_description(): string; /** * Get api key URL for the provider. * * @return string */ public function get_api_key_url(): string; /** * Get the list of models supported by the provider. * * @return array An array of models provided by the AI provider. */ public function get_models(): array; /** * Get a specific model by its ID. * * @param string $model_id The ID of the model to retrieve. * @return AIModelInterface|null The model instance or null if not found. */ public function get_model(string $model_id): ?\WeDevs\Dokan\Intelligence\Services\AIModelInterface; /** * Get the default model for the provider. * * @return AIModelInterface|null The default model instance or null if not set. */ public function get_default_model(): ?\WeDevs\Dokan\Intelligence\Services\AIModelInterface; /** * Check if the provider supports type-based models. * * @param string $type The type of model to check (e.g., 'text', 'image'). * * @return bool True if text models are supported, false otherwise. */ public function has_model(string $type): bool; } interface AITextGenerationInterface { /** * Process the text prompt and return the generated response. * * @param string $prompt The input prompt for the AI model. * @param array $args Optional additional data. * @return mixed The response from the AI model. */ public function process_text(string $prompt, array $args = []); } abstract class Model implements \WeDevs\Dokan\Contracts\Hookable, \WeDevs\Dokan\Intelligence\Services\AIModelInterface { const SUPPORTS_TEXT = 'text'; const SUPPORTS_IMAGE = 'image'; const SUPPORTS_AUDIO = 'audio'; const SUPPORTS_VIDEO = 'video'; /** * List of supported generation types. * * @var string[] */ protected array $supports = [self::SUPPORTS_TEXT => \WeDevs\Dokan\Intelligence\Services\AITextGenerationInterface::class, self::SUPPORTS_IMAGE => \WeDevs\Dokan\Intelligence\Services\AIImageGenerationInterface::class]; /** * The type of generation this model currently performing. * * @var string */ protected string $generation_type = self::SUPPORTS_TEXT; /** * @inheritDoc */ public function register_hooks(): void { } /** * Enlist the model in the provided models array. * * @param AIModelInterface[] $models The array of models to enlist into. * * @return array The updated array of models including this model. */ public function enlist(array $models): array { } /** * Get the model ID. * * @return string */ abstract public function get_id(): string; /** * Get the model title. * * @return string */ abstract public function get_title(): string; /** * Get the model description. * * @return string */ abstract public function get_description(): string; /** * Get the model provider ID. * * @return string */ abstract public function get_provider_id(): string; /** * Check if the model can generate text. * * @param string $type The type of generation to check (e.g., 'text', 'image'). * * @return bool */ public function supports(string $type): bool { } /** * Get the list of supported generation types. * * @return array */ protected function get_supports(): array { } /** * Retrieves the API url required. * * @return string The API key. */ abstract protected function get_url(): string; /** * Retrieves the headers required for the API request. * * @return array */ abstract protected function get_headers(): array; /** * Retrieves the payload required for the API request. * * @param string $prompt * @param array $args * * @return array */ abstract protected function get_payload(string $prompt, array $args = []): array; /** * Retrieves the API key. * * @return string */ protected function get_api_key(): string { } /** * Retrieves the type prefix for generation. * * This is used to differentiate between different types of generation (e.g., text, image). * * @return string The type prefix for generation. */ protected function get_type_prefix_for_generation(): string { } /** * Check if the API key is valid. * * * @return bool */ protected function is_valid_api_key(): bool { } /** * Make API request * * @param string $prompt Prompt for the AI model. * @param array $args Additional arguments for the request. * * @return array * @throws Exception */ protected function request(string $prompt, array $args = []): array { } } } namespace WeDevs\Dokan\Intelligence\Services\Models { class GeminiTwoDotFiveFlashLite extends \WeDevs\Dokan\Intelligence\Services\Model implements \WeDevs\Dokan\Intelligence\Services\AITextGenerationInterface { protected const BASE_URL = 'https://generativelanguage.googleapis.com/v1beta/'; /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } /** * @inheritDoc */ public function get_provider_id(): string { } /** * Retrieves the API url required. * * @return string The API key. */ protected function get_url(): string { } /** * Retrieves the headers required for the API request. * * @return array */ protected function get_headers(): array { } /** * Retrieves the payload required for the API request. * * @param string $prompt * @param array $args * * @return array */ protected function get_payload(string $prompt, array $args = []): array { } /** * @inheritDoc */ public function process_text(string $prompt, array $args = []) { } } class GeminiTwoDotFiveFlash extends \WeDevs\Dokan\Intelligence\Services\Models\GeminiTwoDotFiveFlashLite implements \WeDevs\Dokan\Intelligence\Services\AITextGenerationInterface { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class GeminiTwoDotFivePro extends \WeDevs\Dokan\Intelligence\Services\Models\GeminiTwoDotFiveFlashLite implements \WeDevs\Dokan\Intelligence\Services\AITextGenerationInterface { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTThreeDotFiveTurbo extends \WeDevs\Dokan\Intelligence\Services\Model implements \WeDevs\Dokan\Intelligence\Services\AITextGenerationInterface { protected const BASE_URL = 'https://api.openai.com/v1/'; /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } /** * @inheritDoc */ public function get_provider_id(): string { } /** * Retrieves the API url required. * * @return string The API key. */ protected function get_url(): string { } /** * Retrieves the headers required for the API request. * * @return array */ protected function get_headers(): array { } /** * Process the text prompt and return the generated response. * * @param string $prompt The input prompt for the AI model. * @param array $args Optional additional data. * * @return mixed The response from the AI model. */ public function process_text(string $prompt, array $args = []) { } /** * Retrieves the payload required for the API request. * * @param string $prompt * @param array $args * * @return array */ protected function get_payload(string $prompt, array $args = []): array { } } class OpenAIChatGPTFourO extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFiveDotFourMini extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFiveDotFourNano extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFiveNano extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } /** * GPT-5 family models only accept the default temperature (1), * so drop the parent's explicit `temperature` value. * * @see https://github.com/valentinfrlch/ha-llmvision/issues/437 * * @since 5.0.0 * * @param string $prompt 1st prompt. * @param array $args Arguments of the prompt. * * @return array */ protected function get_payload(string $prompt, array $args = []): array { } } class OpenAIGPTFiveMini extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTFiveNano { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFourDotOneMini extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFourO extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFourOMini extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } class OpenAIGPTFourTurbo extends \WeDevs\Dokan\Intelligence\Services\Models\OpenAIGPTThreeDotFiveTurbo { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } } } namespace WeDevs\Dokan\Intelligence\Services { /** * Abstract class for AI Provider * * This class serves as a base for all AI providers in the Dokan Intelligence system. * It implements the AIProviderInterface and provides common functionality * * @package WeDevs\Dokan\Intelligence\Services */ abstract class Provider implements \WeDevs\Dokan\Intelligence\Services\AIProviderInterface, \WeDevs\Dokan\Contracts\Hookable { const GENERATION_TYPE_TEXT = 'text'; const GENERATION_TYPE_IMAGE = 'image'; const GENERATION_TYPE_AUDIO = 'audio'; const GENERATION_TYPE_VIDEO = 'video'; /** * @inheritDoc */ abstract public function get_id(): string; /** * @inheritDoc */ abstract public function get_title(): string; /** * @inheritDoc */ abstract public function get_description(): string; abstract public function get_api_key_url(): string; /** * @return AIModelInterface[] */ public function get_models(): array { } /** * @inheritDoc */ public function get_model(string $model_id): ?\WeDevs\Dokan\Intelligence\Services\AIModelInterface { } /** * @inheritDoc */ public function get_default_model(): ?\WeDevs\Dokan\Intelligence\Services\AIModelInterface { } abstract public function get_default_model_id(): string; /** * @inheritDoc */ public function has_model(string $type): bool { } /** * Get models by type. * * This method retrieves models that support a specific generation type. * * @param string $type The type of generation (e.g., 'text', 'image'). * @return AIModelInterface[] An array of models that support the specified type. */ public function get_models_by_type(string $type) { } /** * Register hooks for the provider. * * This method is used to register the necessary hooks for the AI provider. * It should be called during the plugin initialization phase. */ public function register_hooks(): void { } /** * Enlist the provider in the Dokan Intelligence system. * * This method adds the current provider instance to the list of AI providers. * * @param array $providers The existing list of AI providers. * @return array The updated list of AI providers including the current provider. */ public function enlist(array $providers): array { } } } namespace WeDevs\Dokan\Intelligence\Services\Providers { class Gemini extends \WeDevs\Dokan\Intelligence\Services\Provider { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } public function get_default_model_id(): string { } public function get_api_key_url(): string { } } class OpenAI extends \WeDevs\Dokan\Intelligence\Services\Provider { /** * @inheritDoc */ public function get_id(): string { } /** * @inheritDoc */ public function get_title(): string { } /** * @inheritDoc */ public function get_description(): string { } public function get_default_model_id(): string { } public function get_api_key_url(): string { } } } namespace WeDevs\Dokan\Intelligence\Utils { class AISupportedFields { public static function get_supported_fields(): array { } } class PromptUtils { /** * Find personalized prompt by key. * * @param string $id The id to search for. * @return string|null The personalized prompt or null if not found. */ public static function get_personalized_prompt(string $id): ?string { } /** * Prepares a personalized prompt based on the given ID and original prompt. * * @param string $id The ID for finding the personalized prompt. * @param string $prompt The original prompt. * @return string The prepared prompt. */ public static function prepare_prompt(string $id, string $prompt): string { } } } namespace WeDevs\Dokan\Models { abstract class BaseModel extends \WC_Data { /** * Save should create or update based on object existence. * * @return int */ public function save() { } /** * Delete an object, set the ID to 0, and return result. * * @param bool $force_delete Should the date be deleted permanently. * @return bool result */ public function delete($force_delete = false) { } /** * Delete raws from the database. * * @param array $data Array of args to delete an object, e.g. `array( 'id' => 1, status => ['draft', 'cancelled'] )` or `array( 'id' => 1, 'status' => 'publish' )`. * @return bool result */ public static function delete_by(array $data) { } /** * Prefix for action and filter hooks on data. * * @return string */ protected function get_hook_prefix() { } /** * Get All Meta Data. * * @since 2.6.0 * @return array of objects. */ public function get_meta_data() { } /** * Clear the cache group for this model. * * @return void */ public function clear_cache_group() { } } /** * Admin Dashboard Stats Model Class * * @since 4.1.0 */ class AdminDashboardStats extends \WeDevs\Dokan\Models\BaseModel { /** * This is the name of this object type. * * @since 4.1.0 * * @var string */ protected $object_type = 'admin_dashboard_stats'; /** * Constructor. * * @since 4.1.0 * * @param int $id ID to load from the DB (optional) or an AdminDashboardStats object. */ public function __construct(int $id = 0) { } /** * Get new customers' data. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array New customers data. */ public static function get_new_customers_data(array $date_range): array { } /** * Get order cancellation rate data. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Order cancellation rate data. */ public static function get_order_cancellation_rate_data(array $date_range): array { } /** * Get new products data. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array New products data. */ public static function get_new_products_data(array $date_range): array { } /** * Get active vendors data. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Active vendors data. */ public static function get_active_vendors_data(array $date_range): array { } /** * Get monthly overview data. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Monthly overview data. */ public static function get_monthly_overview(array $date_range): array { } /** * Get top-performing vendors. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. Optional. * @param string $end_date End date in Y-m-d format. Optional. * @param int $limit Number of vendors to retrieve. Default 5. * * @return array Array of vendor data with sales metrics. */ public static function get_top_performing_vendors(string $start_date, string $end_date, int $limit = 5): array { } /** * Get vendor metrics data. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return array Vendor metrics data. */ public static function get_vendor_metrics(string $start_date, string $end_date): array { } } } namespace WeDevs\Dokan\Models\DataStore { /** * Data Store interface. * * @since 4.0.4 */ interface DataStoreInterface { /** * Create a new data. * * @since 4.0.4 * * @param BaseModel $model * * @return void */ public function create(\WeDevs\Dokan\Models\BaseModel &$model); /** * Method to read a download permission from the database. * * @param BaseModel $model BaseModel object. * * @phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared * * @throws Exception Throw exception if invalid entity is passed. */ public function read(\WeDevs\Dokan\Models\BaseModel &$model); /** * Update a data. * * @since 4.0.4 * * @param BaseModel $model The model to update. * * @return void * @throw \Exception */ public function update(\WeDevs\Dokan\Models\BaseModel &$model); /** * Delete a data. * * @since 4.0.4 * * @param BaseModel $model The model to delete. * * @return void * @throw \Exception */ public function delete(\WeDevs\Dokan\Models\BaseModel &$model); /** * Get a data. * * @since 4.0.4 * * @param BaseModel $model The model to get. * * @return void * @throw \Exception */ // public function get( BaseModel &$model ); /** * Query data. * * @since 4.0.4 * * @param array $args * * @return array */ // public function query( array $args = [] ): array; /** * Count data. * * @since 4.0.4 * * @param array $args * * @return int */ // public function count( array $args = [] ): int; } /** * Base data store class. * * @since 4.0.4 */ abstract class BaseDataStore extends \Automattic\WooCommerce\Admin\API\Reports\SqlQuery implements \WeDevs\Dokan\Models\DataStore\DataStoreInterface { protected $selected_columns = ['*']; /** * Get the fields with format as an array where key is the db field name and value is the format. * * @return array */ abstract protected function get_fields_with_format(): array; /** * Get the table name with or without prefix * * @return string */ abstract public function get_table_name(): string; /** * Create a new record in the database using the provided model data. * * @param BaseModel $model The model object containing the data to be inserted. */ public function create(\WeDevs\Dokan\Models\BaseModel &$model) { } /** * Method to read a download permission from the database. * * @param BaseModel $model BaseModel object. * * @phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared * * @throws Exception Throw exception if invalid entity is passed. */ public function read(\WeDevs\Dokan\Models\BaseModel &$model) { } /** * Method to update a download in the database. * * @param BaseModel $model WC_Customer_Download object. */ public function update(\WeDevs\Dokan\Models\BaseModel &$model) { } /** * Method to delete a download permission from the database. * * @param BaseModel $model BaseModel object. * @param array $args Array of args to pass to the delete method. */ public function delete(\WeDevs\Dokan\Models\BaseModel &$model, $args = array()) { } /** * Method to delete a download permission from the database by ID. * * @param int $id permission_id of the download to be deleted. * * @phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared * * @return int Number of affected rows. */ public function delete_by_id($id): int { } /** * Delete raws from the database. * * @param array $data Array of args to delete an object, e.g. `array( 'id' => 1, status => ['draft', 'cancelled'] )` or `array( 'id' => 1, 'status' => 'publish' )`. * * @phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared * * @return int Number of affected rows. */ public function delete_by(array $data): int { } /** * Updates rows in the database. * * @param array $where Array of args to identify the object to be updated, e.g. `array( 'id' => 1, 'status' => 'draft' )`. * @param array $data_to_update Array of args to update the object, e.g. `array( 'status' => 'publish' )`. * * @return int Number of affected rows. */ public function update_by(array $where, array $data_to_update) { } /** * Prepares a SQL WHERE clause from an associative array of data. * * This method takes an array of data where keys are column names and values * are the values to filter by. It generates a secure SQL WHERE clause using * prepared statements to protect against SQL injection. * * If a value in the data array is an array itself, it generates an IN clause * with multiple placeholders. Otherwise, it generates a simple equality check. * * @param array $data Associative array of column names and values to filter by. * @return string The generated WHERE clause. */ protected function prepare_where_clause(array $data): string { } /** * Create download permission for a user, from an array of data. * Assumes that all the keys in the passed data are valid. * * @param array $data Data to create the permission for. * @return int The database id of the created permission, or false if the permission creation failed. */ protected function insert(array $data) { } /** * Prepare data for saving a BaseModel to the database. * * @param BaseModel $model The model to prepare. * @return array Array of data to save. */ protected function map_model_to_db_data(\WeDevs\Dokan\Models\BaseModel &$model): array { } /** * Read meta data for the given model. Generally, We may not need this method. * * @param BaseModel $model The model for which to read meta data. */ public function read_meta(\WeDevs\Dokan\Models\BaseModel &$model): void { } /** * Maps database raw data to model data. * * @param object $raw_data The raw data object retrieved from the database. * @return array An array of model data mapped from the database fields. */ protected function map_db_raw_to_model_data($raw_data): array { } /** * Get the date format for a specific database field. * * @param string $db_field_name The name of the database field. * @return string The format in which the date is returned. */ protected function get_date_format_for_field(string $db_field_name): string { } /** * Returns a list of columns selected by the query_args formatted as a comma separated string. * * @return string */ protected function get_selected_columns(): string { } /** * Generates a hook prefix. * * @return string The hook prefix. */ protected function get_hook_prefix(): string { } /** * Gets the table name with the WordPress table prefix. * * @return string The table name with the WordPress table prefix. */ protected function get_table_name_with_prefix(): string { } /** * Get the name of the id field. * * @return string The name of the id field. */ protected function get_id_field_name(): string { } /** * Gets the format of the id field. * * @return string The format of the id field. */ protected function get_id_field_format(): string { } /** * Get the fields. * * @return array The filtered array of fields. */ protected function get_fields(): array { } /** * Get the fields with format. * * @return array The filtered array of format of the fields. */ protected function get_fields_format(): array { } } /** * Admin Dashboard Stats Store Class * * @since 4.1.0 */ class AdminDashboardStatsStore extends \WeDevs\Dokan\Models\DataStore\BaseDataStore { /** * Vendor Order Stats Store instance. * * @var VendorOrderStatsStore */ protected $vendor_order_stats_store; /** * Constructor. * * @since 4.1.0 */ public function __construct() { } /** * Get the fields with format as an array where key is the db field name and value is the format. * * @since 4.1.0 * * @return array */ protected function get_fields_with_format(): array { } /** * Get the table name. * * @since 4.1.0 * * @return string */ public function get_table_name(): string { } /** * Get the ID field name. * * @since 4.1.0 * * @return string */ protected function get_id_field_name(): string { } /** * Get recurring customers data for current and previous periods using wc_order_stats. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Recurring customers data. */ public function get_recurring_customers_data(array $date_range): array { } /** * Get new customers data for current and previous periods. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array New customers data. */ public function get_new_customers_data(array $date_range): array { } /** * Get order cancellation rate data for current and previous periods. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Order cancellation rate data. */ public function get_order_cancellation_rate_data(array $date_range): array { } /** * Get new products data for current and previous periods. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array New products' data. */ public function get_new_products_data(array $date_range): array { } /** * Get active vendors data for current and previous periods using VendorOrderStatsStore. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Active vendors data. */ public function get_active_vendors_data(array $date_range): array { } /** * Get new vendor registration data for current and previous periods. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array New vendor registration data. */ public function get_new_vendor_registration_data(array $date_range): array { } /** * Get monthly overview data including new customers and order stats. * * @since 4.1.0 * * @param array $date_range Array containing date range information. * * @return array Monthly overview data. */ public function get_monthly_overview(array $date_range): array { } /** * Get top performing vendors using VendorOrderStatsStore. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. Optional. * @param string $end_date End date in Y-m-d format. Optional. * @param int $limit Number of vendors to retrieve. Default 5. * * @return array Array of vendor data with sales metrics. */ public function get_top_performing_vendors(string $start_date, string $end_date, int $limit = 5): array { } /** * Get vendor metrics data. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return array Vendor metrics data. */ public function get_vendor_metrics(string $start_date, string $end_date): array { } /** * Get filtered product types. * * @since 4.1.0 * * @return array Filtered product types. */ public function get_filtered_product_types(): array { } } /** * Class VendorBalanceStore * * @since 4.0.4 */ class VendorBalanceStore extends \WeDevs\Dokan\Models\DataStore\BaseDataStore { /** * @inheritDoc */ protected function get_fields_with_format(): array { } /** * @inheritDoc */ public function get_table_name(): string { } /** * Used to get perticulars through the get_perticulars method by the DataStore. * * @param VendorBalance $model * @param string $context * @return string */ protected function get_perticulars(\WeDevs\Dokan\Models\VendorBalance $model, string $context = 'edit'): string { } /** * Retrieve the total balance for a given vendor. * * @param int $vendor_id * @param DateTimeImmutable $balance_date * @return float */ public function get_total_earning_by_vendor($vendor_id, \DateTimeImmutable $balance_date): float { } } /** * Vendor Order Stats Store Class * * @since 4.1.0 */ class VendorOrderStatsStore extends \WeDevs\Dokan\Models\DataStore\BaseDataStore { /** * Get the fields with format as an array where key is the db field name and value is the format. * * @since 4.1.0 * * @return array */ protected function get_fields_with_format(): array { } /** * Get the table name. * * @since 4.1.0 * * @return string */ public function get_table_name(): string { } /** * Get the ID field name. * * @since 4.1.0 * * @return string */ protected function get_id_field_name(): string { } /** * Get count of active vendors within a date range. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return int Count of active vendors. */ public function get_active_vendors_count(string $start_date, string $end_date): int { } /** * Get top performing vendors. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. Optional. * @param string $end_date End date in Y-m-d format. Optional. * @param int $limit Number of vendors to retrieve. Default 5. * * @return array Array of vendor data with sales metrics. */ public function get_top_performing_vendors(string $start_date, string $end_date, int $limit = 5): array { } /** * Get sales chart data for a date range. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * @param bool $group_by_day Whether to group data by day. Default false. * * @return array Sales chart data with totals. */ public function get_sales_chart_data(string $start_date, string $end_date, bool $group_by_day = false): array { } /** * Fill missing dates in the data array for a given date range. * * @since 4.1.0 * * @param array $data The data array containing date and sales information. * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return array The data array with missing dates filled in. */ protected function fill_missing_dates(array $data, string $start_date, string $end_date): array { } /** * Get report logs or earnings data from the dokan_order_stats table. * * @since 5.0.0 * * @param array $args Query arguments. * * @return array Raw database results. */ public function get_report_data(array $args): array { } /** * Get the total count of report logs or earnings from the dokan_order_stats table. * * @since 5.0.0 * * @param array $args Query arguments. * * @return int Total count. */ public function get_report_count(array $args): int { } /** * Get the report summary from the dokan_order_stats table. * * @since 5.0.0 * * @return array Summary totals. */ public function get_report_summary(array $args = []): array { } /** * Apply common filters for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_report_filters(array $args): void { } /** * Apply order type filter for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_order_type_filter(array $args): void { } /** * Apply vendor filter for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_vendor_filter(array $args): void { } /** * Apply order filter for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_order_filter(array $args): void { } /** * Apply order status filter for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_status_filter(array $args): void { } /** * Apply date filter for report logs or earnings queries. * * @since 5.0.0 * * @param array $args Query arguments. * * @return void */ protected function apply_date_filter(array $args): void { } /** * Get refund data for the given order IDs. * * @since 5.0.0 * * @param array $order_ids Array of order IDs. * * @return array Refund data indexed by parent ID. */ public function get_refund_data(array $order_ids): array { } } } namespace WeDevs\Dokan\Models { class VendorBalance extends \WeDevs\Dokan\Models\BaseModel { const TRN_TYPE_DOKAN_ORDERS = 'dokan_orders'; const TRN_TYPE_DOKAN_WITHDRAW = 'dokan_withdraw'; const TRN_TYPE_DOKAN_REFUND = 'dokan_refund'; /** * This is the name of this object type. * * @var string */ protected $object_type = 'dokan_vendor_balance'; /** * Cache group. * * @var string */ protected $cache_group = 'dokan_vendor_balance'; /** * The default data of the object. * * @var array */ protected $data = ['vendor_id' => 0, 'trn_id' => 0, 'trn_type' => '', 'perticulars' => '', 'debit' => 0, 'credit' => 0, 'status' => '', 'trn_date' => '', 'balance_date' => '']; /** * Initializes the vendor balance model. * * @param int $id The ID of the vendor balance to initialize. Default is 0. */ public function __construct(int $id = 0) { } /** * Updates the vendor balance based on a transaction. * * @param int $trn_id The transaction ID. * @param string $trn_type The type of transaction. Valid values are * {@see WeDevs\Dokan\Models\VendorBalance::TRN_TYPE_DOKAN_ORDERS}, * {@see WeDevs\Dokan\Models\VendorBalance::TRN_TYPE_DOKAN_WITHDRAW}, * and {@see WeDevs\Dokan\Models\VendorBalance::TRN_TYPE_DOKAN_REFUND}. * @param array $data The data to update. * * @return int Number of affected rows. */ public static function update_by_transaction(int $trn_id, string $trn_type, array $data): int { } /** * Gets the vendor ID of the vendor balance. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int The vendor ID. */ public function get_vendor_id(string $context = 'view') { } /** * Sets the vendor ID of the vendor balance. * * @param int $id The vendor ID. * @return void */ public function set_vendor_id(int $id) { } /** * Gets the transaction ID. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return int The transaction ID. */ public function get_trn_id(string $context = 'view') { } /** * Sets the transaction ID. * * @param int $id The transaction ID. * @return void */ public function set_trn_id(int $id) { } /** * Gets the transaction type. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string The transaction type. Valid values are: * 'dokan_orders', 'dokan_withdraw', 'dokan_refund'. */ public function get_trn_type(string $context = 'view') { } /** * Sets the transaction type for the transaction. * * @param string $type The type of the transaction. Valid values are: * 'dokan_orders, 'dokan_withdraw', 'dokan_refund'. * @return void */ public function set_trn_type(string $type) { } /** * Gets the particulars for the transaction. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return string The particulars. */ public function get_particulars(string $context = 'view'): string { } /** * Set the perticulars (note) for the transaction. * * @param string $note The note to be stored. * @return void */ public function set_particulars(string $note) { } /** * Set the perticulars (note) for the transaction. * * @param string $note The note to be stored. * @return void */ protected function set_perticulars(string $note) { } /** * Get the debit amount. * * @param string $context The context in which to get the debit amount. * @return float The debit amount. */ public function get_debit(string $context = 'view'): float { } /** * Set the debit amount. * * @param float $amount The debit amount. * @return void */ public function set_debit(float $amount) { } /** * Get the credit amount. * * @param string $context The context in which to get the credit amount. * @return float The credit amount. */ public function get_credit(string $context = 'view') { } /** * Set the credit amount. * * @param float $amount The credit amount. * @return void */ public function set_credit(float $amount) { } /** * Get the status of the vendor balance. * * @param string $context The context in which to get the status. Valid values are 'view' and 'edit'. * @return string The status of the vendor balance. */ public function get_status(string $context = 'view'): string { } /** * Set the status of the vendor balance. * * @param string $status The status to be set. * @return void */ public function set_status(string $status) { } /** * Get the transaction date. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return \WC_DateTime The transaction date. */ public function get_trn_date(string $context = 'view') { } /** * Set the transaction date. * * @param string $date The transaction date. Accepts date in `Y-m-d` or `Y-m-d H:i:s` format. * @return void */ public function set_trn_date(string $date) { } /** * Get the balance date. * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * @return \WC_DateTime The balance date. */ public function get_balance_date(string $context = 'view') { } /** * Set the balance date. * * @param string $date The balance date. Accepts date in `Y-m-d` or `Y-m-d H:i:s` format. * @return void */ public function set_balance_date(string $date) { } /** * Calculates and retrieves the total earnings of a vendor up to a specific date. * * This calculation includes: * - The sum of completed order amounts * - Minus the sum of refunded amounts * - Ignores/Excludes any withdrawals from the total earnings * * @param int $vendor_id The unique identifier for the vendor. * @param string $on_date Optional date in 'Y-m-d' format to calculate earnings up to. Defaults to the current date if not provided. * * @return float The vendor's total earnings up to the specified date. */ public static function get_total_earning_by_vendor($vendor_id, $on_date = null) { } } /** * Vendor Order Stats Model Class * * @since 4.1.0 */ class VendorOrderStats extends \WeDevs\Dokan\Models\BaseModel { /** * This is the name of this object type. * * @var string */ protected $object_type = 'dokan_vendor_order_stats'; /** * The default data of the object. * * @var array */ protected $data = ['order_id' => 0, 'vendor_id' => 0, 'order_type' => 0, 'vendor_earning' => 0, 'vendor_gateway_fee' => 0, 'vendor_shipping_fee' => 0, 'vendor_discount' => 0, 'admin_commission' => 0, 'admin_gateway_fee' => 0, 'admin_shipping_fee' => 0, 'admin_discount' => 0, 'admin_subsidy' => 0]; /** * Initializes the vendor order stats model. * * @since 4.1.0 * * @param int $id The ID of the vendor order stats to initialize. Default is 0. */ public function __construct(int $id = 0) { } /** * Gets the order ID. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return int The order ID. */ public function get_order_id(string $context = 'view') { } /** * Sets the order ID. * * @since 4.1.0 * * @param int $id The order ID. * * @return void */ public function set_order_id(int $id) { } /** * Gets the vendor ID. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return int The vendor ID. */ public function get_vendor_id(string $context = 'view') { } /** * Sets the vendor ID. * * @since 4.1.0 * * @param int $id The vendor ID. * * @return void */ public function set_vendor_id(int $id) { } /** * Gets the order type. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return int The order type. */ public function get_order_type(string $context = 'view') { } /** * Sets the order type. * * @since 4.1.0 * * @param int $type The order type. * * @return void */ public function set_order_type(int $type) { } /** * Gets the vendor earning. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The vendor earning. */ public function get_vendor_earning(string $context = 'view') { } /** * Sets the vendor earning. * * @since 4.1.0 * * @param float $amount The vendor earning. * * @return void */ public function set_vendor_earning(float $amount) { } /** * Gets the vendor gateway fee. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The vendor gateway fee. */ public function get_vendor_gateway_fee(string $context = 'view') { } /** * Sets the vendor gateway fee. * * @since 4.1.0 * * @param float $amount The vendor gateway fee. * * @return void */ public function set_vendor_gateway_fee(float $amount) { } /** * Gets the vendor shipping fee. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The vendor shipping fee. */ public function get_vendor_shipping_fee(string $context = 'view') { } /** * Sets the vendor shipping fee. * * @since 4.1.0 * * @param float $amount The vendor shipping fee. * * @return void */ public function set_vendor_shipping_fee(float $amount) { } /** * Gets the vendor discount. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The vendor discount. */ public function get_vendor_discount(string $context = 'view') { } /** * Sets the vendor discount. * * @since 4.1.0 * * @param float $amount The vendor discount. * * @return void */ public function set_vendor_discount(float $amount) { } /** * Gets the admin commission. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The admin commission. */ public function get_admin_commission(string $context = 'view') { } /** * Sets the admin commission. * * @since 4.1.0 * * @param float $amount The admin commission. * * @return void */ public function set_admin_commission(float $amount) { } /** * Gets the admin gateway fee. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The admin gateway fee. */ public function get_admin_gateway_fee(string $context = 'view') { } /** * Sets the admin gateway fee. * * @since 4.1.0 * * @param float $amount The admin gateway fee. * * @return void */ public function set_admin_gateway_fee(float $amount) { } /** * Gets the admin shipping fee. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The admin shipping fee. */ public function get_admin_shipping_fee(string $context = 'view') { } /** * Sets the admin shipping fee. * * @since 4.1.0 * * @param float $amount The admin shipping fee. * * @return void */ public function set_admin_shipping_fee(float $amount) { } /** * Gets the admin discount. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The admin discount. */ public function get_admin_discount(string $context = 'view') { } /** * Sets the admin discount. * * @since 4.1.0 * * @param float $amount The admin discount. * * @return void */ public function set_admin_discount(float $amount) { } /** * Gets the admin subsidy. * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The admin subsidy. */ public function get_admin_subsidy(string $context = 'view') { } /** * Sets the admin subsidy. * * @since 4.1.0 * * @param float $amount The admin subsidy. * * @return void */ public function set_admin_subsidy(float $amount) { } /** * Get total sales (vendor earning + admin commission) * * @since 4.1.0 * * @param string $context What the value is for. Valid values are 'view' and 'edit'. * * @return float The total sales amount. */ public function get_total_sales(string $context = 'view') { } /** * Get count of active vendors within a date range. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return int Count of active vendors. */ public static function get_active_vendors_count(string $start_date, string $end_date): int { } /** * Get top performing vendors. * * @since 4.1.0 * * @param int $limit Number of vendors to retrieve. Default 5. * * @return array Array of vendor data with sales metrics. */ public static function get_top_performing_vendors(int $limit = 5): array { } /** * Get sales chart data for a date range. * * @since 4.1.0 * * @param string $start_date Start date in Y-m-d format. * @param string $end_date End date in Y-m-d format. * * @return array Sales chart data with totals. */ public static function get_sales_chart_data(string $start_date, string $end_date, bool $group_by_day = false): array { } } } namespace WeDevs\Dokan\Order\Admin { /** * Order admin related hooks * * @since 3.8.0 moved functionality from includes/Admin/Hooks.php file */ class Hooks { /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Remove child orders from WC reports * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * * @param array $query * * @return array */ public function admin_order_reports_remove_parents($query) { } /** * Change the columns shown in admin. * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param array $existing_columns * * @return array */ public function admin_shop_order_edit_columns($existing_columns) { } /** * Adds custom column on dokan admin shop order table * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param string $col * @param int|WC_Order $post_id * * @return void */ public function shop_order_custom_columns($col, $post_id) { } /** * Adds css classes on admin shop order table * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param string[] $classes An array of post class names. * @param string[] $css_class An array of additional class names added to the post. * @param int $post_id The post ID. * * @global WP_Post $post * * @return array */ public function admin_shop_order_row_classes($classes, $css_class, $post_id) { } /** * Show/hide sub order css/js * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Added HPOS support * * @return void */ public function admin_shop_order_scripts() { } /** * Change order item display meta key. * * @since 3.8.0 * @since 3.8.0 Moved this method from Order/Hooks.php file * * @param string $display_key * * @return string */ public function change_order_item_display_meta_key($display_key) { } /** * Change order item display meta value. * * @since 3.8.0 * @since 3.8.0 Moved this method from Order/Hooks.php file * * @param string $display_value * @param object $meta * * @return string */ public function change_order_item_display_meta_value($display_value, $meta) { } /** * Delete sub orders when parent order is trashed * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param int $post_id */ public function admin_on_trash_order($post_id) { } /** * Un-trash sub orders when parent orders are un-trashed * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param int $post_id * * @return void */ public function admin_on_untrash_order($post_id) { } /** * Delete sub orders and from dokan sync table when a order is deleted * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param int $post_id * * @return void */ public function admin_on_delete_order($post_id) { } /** * Delete sub orders and from dokan sync table when a order is deleted * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param int $post_id * * @return void */ public function admin_on_delete_order_post($post_id) { } /** * Show a toggle button to toggle all the sub orders * * @since 3.8.0 Moved from includes/Admin/Hooks.php file * @since 3.8.0 Rewritten for HPOS * * @param string $typenow * * @return void */ public function admin_shop_order_toggle_sub_orders($typenow) { } /** * Render the order type filter dropdown. * * @since 4.2.1 * * @param string $typenow * * @return void */ public function render_order_type_filter_dropdown($typenow) { } /** * Filter orders by order type for both HPOS and legacy. * * @since 4.2.1 * * @param array $query_args Query arguments (HPOS) or query vars (legacy) * * @return array */ public function filter_orders_by_order_type_query($query_args) { } /** * Add dokan commission meta-box in woocommerce order details page * and add suborders or related sibling orders in meta-box. * * @since 3.14.0 * * @return void */ public function add_commission_metabox_and_related_orders_in_order_details_page($post_type, $post) { } /** * Dokan order commission meta-box body. * * @since 3.14.0 * * @param WP_Post|WC_Order $post_or_order * * @return void */ public function commission_meta_box($post_or_order) { } /** * Content of suborder or related order meta-box. * * @param $post_or_order * * @return void */ public function sub_or_related_orders_meta_box($post_or_order) { } } /** * Handle Admin Order Permission Related Hooks * * @since 3.8.0 */ class Permissions { /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Dokan map meta cpas for vendors * * @since 3.8.0 moved this method from includes/functions.php file * @since 3.8.0 Added HPOS support * * @param array $caps * @param string $cap * @param int $user_id * @param array $args * * @return array */ public function map_meta_caps($caps, $cap, $user_id, $args) { } /** * Filter orders of current user * * @since 3.8.2 * * @param array $args * * @return array */ public function hpos_filter_orders_for_current_vendor($args) { } /** * Filter orders of current user * * @since 2.9.4 * @since 3.8.0 Moved this method from includes/functions.php * @since 3.8.0 Added HPOS Support * * @param array $args * @param object $query * * @return array */ public function filter_orders_for_current_vendor($args, $query) { } /** * Revoke vendor access of changing order status in the backend if permission is not given * * @since 2.8.0 * @since 3.8.0 Moved this method from includes/functions.php file * * @return void */ public function revoke_change_order_status() { } /** * Revoke vendor access of changing order status in the backend if permission is not given * * @since 2.8.0 * @since 3.8.0 Moved this method from includes/functions.php * * @param array $columns * * @return array */ public function remove_action_column($columns) { } /** * Revoke vendor access of changing order status in the backend if permission is not given * * @since 2.8.0 * @since 3.8.0 Moved this method form includes/functions.php file * * @param array $actions * * @return array; */ public function remove_action_button($actions) { } } } namespace WeDevs\Dokan\Order { /** * Class Ajax * * @since 3.10.3 * * @package WeDevs\Dokan\Order */ class Ajax { /** * Class constructor * * @since 3.10.3 * * @return void */ public function __construct() { } /** * Search downloadable products * * @since 3.10.3 * * @return void */ public function search_downloadable_products() { } } /** * Handle permission related hooks for Orders * * @since 3.8.0 */ class Controller { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Load required classes * * @return void */ public function init_classes() { } } /** * Order admin related hooks * * @since 3.8.0 moved functionality from includes/Admin/Hooks.php file */ class EmailHooks { /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Stop sending multiple email for an order * * @since 2.8.6 * @since 3.8.0 Moved this method from includes/functions.php file * * @return void */ public function prevent_sending_multiple_email() { } /** * Send email to the vendor/seller when cancel the order * * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @param string $recipient * @param WC_Order $order * * @return string */ public function send_email_for_order_cancellation($recipient, $order) { } /** * Add vendor email on customers note mail replay to * * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @param string $headers * @param string $id * @param WC_Order $order * * @return string $headers */ public function add_reply_to_vendor_email_on_wc_customer_note_mail($headers, $id, $order) { } /** * Exclude child order emails for customers * * A hacky and dirty way to do this from this action. Because there is no easy * way to do this by removing action hooks from WooCommerce. It would be easier * if they were from functions. Because they are added from classes, we can't * remove those action hooks. That's why we are doing this from the phpmailer_init action * by returning a fake phpmailer class. * * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @param \PHPMailer $phpmailer * * @return void */ public function exclude_child_customer_receipt($phpmailer) { } } } namespace WeDevs\Dokan\Order\Frontend { /** * Order Frontend Hooks * * @since 3.8.0 */ class Hooks { /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Change bulk order status in vendor dashboard * * @since 2.8.3 * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @return void */ public function bulk_order_status_change() { } } } namespace WeDevs\Dokan\Order { /** * Admin Hooks * * @since 3.0.0 * * @package dokan * * @author weDevs */ class Hooks { /** * Load automatically when class initiate * * @since 3.0.0 * * @return void */ public function __construct() { } /** * Retrieve commission meta using old dokan_commission_meta. * * @return mixed */ public function get_dokan_commission_meta($value, $line_item) { } /** * Update the child order status when a parent order status is changed * * @param int $order_id * @param string $old_status * @param string $new_status * @param WC_Order $order * * @return void */ public function on_order_status_change($order_id, $old_status, $new_status, $order) { } /** * Check if a status change is allowed for a sub-order. * * This method determines whether a sub-order can transition from its current status * to a new status, based on a configurable whitelist of allowed transitions. * * @since 3.12.2 * * @param string $current_status The current status of the sub-order (should include 'wc-' prefix). * @param string $new_status The new status to check (should include 'wc-' prefix). * * @return bool True if the status change is allowed, false otherwise. */ private function is_status_change_allowed(string $current_status, string $new_status): bool { } /** * Ensure a status string has the 'wc-' prefix. * * @since 3.12.2 * * @param string $status The status string to check. * * @return string The status string with 'wc-' prefix added if it was missing. */ private function maybe_add_wc_prefix(string $status): string { } /** * Log a skipped status update for a sub-order. * * This method logs a message to the error log when a status update for a sub-order * is skipped because the status change is not allowed. * * @since 3.12.2 * * @param int $order_id The ID of the sub-order. * @param string $current_status The current status of the sub-order. * @param string $new_status The new status that was not allowed. * * @return void */ private function log_skipped_status_update(int $order_id, string $current_status, string $new_status) { } /** * If order status is set to refunded from vendor dashboard, enter remaining balance into vendor balance table. * * @since 3.8.0 Created this method from on_order_status_change() * * @param int $order_id * @param string $old_status * @param string $new_status * @param WC_Order $order * * @return void */ public function manage_refunded_for_order($order_id, $old_status, $new_status, $order) { } /** * Mark the parent order as complete when all the child order are completed * * @param integer $order_id * @param string $old_status * @param string $new_status * @param WC_Order $order * * @return void */ public function on_sub_order_change($order_id, $old_status, $new_status, $order) { } /** * Split order for vendor * * @since 3.0.0 * * @param $parent_order_id * * @return void */ public function split_vendor_orders($parent_order_id) { } /** * Ensure vendor coupon * * For consistency, restrict coupons in cart if only * products from that vendor exists in the cart. Also, a coupon * should be restricted with a product. * * For example: When entering a coupon created by admin is applied, make * sure a product of the admin is in the cart. Otherwise it wouldn't be * possible to distribute the coupon in sub orders. * * @since 4.0.0 Refactored to make it more flexible, and added filter * * @param boolean $valid Whether the coupon is currently considered valid. * @param WC_Coupon $coupon The coupon object being validated. * @param WC_Discounts $discounts The discount object containing cart/order items being validated. * * @return boolean True if the coupon is valid, false otherwise * @throws Exception When the coupon is invalid for multiple vendors */ public function ensure_coupon_is_valid(bool $valid, \WC_Coupon $coupon, \WC_Discounts $discounts): bool { } /** * Prevent stock reduction for parent orders * * Parent orders should not have their stock reduced. Only sub-orders * should manage stock reductions. * * @param bool $can_reduce Whether stock can be reduced. * @param WC_Order $order The order object. * * @return bool False if this is a parent order, true otherwise. */ public function prevent_stock_reduction_for_parent_order($can_reduce, $order) { } /** * Sync parent order item stock metadata when sub-order item stock is reduced * * When a sub-order item has its stock reduced, also update the parent order item's * _reduced_stock metadata to keep them in sync. * @param WC_Order_Item_Product $item The sub-order item. * @param array $change Change details (product, from, to). * @param WC_Order $order The sub-order. * * @return void */ public function sync_parent_order_item_stock($item, $change, $order) { } } /** * Order Management API * * @since 2.8 * @since 3.8.0 added HPOS support */ class Manager { /** * Get all orders * * @since 3.0.0 * @since 3.6.3 rewritten to include filters * @since 3.8.0 added HPOS support * * @return WP_Error|int[]|WC_Order[] */ public function all($args = []) { } /** * Get backward compatibility args * * @since 3.8.0 * * @param array $args * * @return array */ protected function get_backward_compatibility_args($args = []) { } /** * Get single order details * * @since 3.0.0 * * @return bool|WC_Order|WC_Order_Refund */ public function get($id) { } /** * Count orders for a seller * * @since 3.8.0 moved this function from functions.php file * * @param int $seller_id * * @return array */ public function count_orders($seller_id) { } /** * Check if an order with same id is exists in database * * @since 3.8.0 * * @param int|WC_Order $order_id * * @return boolean */ public function is_order_already_synced($order_id) { } /** * Check if order is belonged to given seller * * @since 3.8.0 * * @param int $seller_id * @param int $order_id * * @return bool */ public function is_seller_has_order($seller_id, $order_id) { } /** * Get order of current logged-in users or by given customer id * * @since 3.8.0 * * @param array $args * * @return \stdClass|WC_Order[]|int[] */ public function get_customer_orders($args) { } /** * Get Customer Order IDs by Seller * * @since 3.8.0 * * @param int $customer_id * @param int $seller_id * * @return int[]|null on failure */ public function get_customer_order_ids_by_seller($customer_id, $seller_id) { } /** * Get all child orders of a parent order * * @param int|WC_Order $parent_order * @param array $args * * @return WC_Order[] */ public function get_child_orders($parent_order, array $args = []) { } /** * Delete dokan order * * @since 3.8.0 * * @param int $order_id * @param int|null $seller_id * * @return void */ public function delete_seller_order($order_id, $seller_id = null) { } /** * Delete dokan order with suborders * * @since 3.8.0 * * @param int $order_id * * @return void */ public function delete_seller_order_with_suborders($order_id) { } /** * Creates a sub order * * @param WC_Order $parent_order * @param integer $seller_id * @param array $seller_products * * @return void|WP_Error */ public function create_sub_order($parent_order, $seller_id, $seller_products) { } /** * Create line items for order * * @param object $order wc_get_order * @param array $products * * @return void */ private function create_line_items($order, $products) { } /** * Create tax line items * * @param WC_Order $order * @param WC_Order $parent_order * @param array $products * * @return void */ private function create_taxes($order, $parent_order, $products) { } /** * Create shipping for a sub-order if neccessary * * @param WC_Order $order * @param WC_Order $parent_order * * @return void */ private function create_shipping($order, $parent_order) { } /** * Create coupons for a sub-order if necessary * * @param WC_Order $order * @param WC_Order $parent_order * * @return void */ private function create_coupons($order, $parent_order) { } /** * Monitors a new order and attempts to create sub-orders * * If an order contains products from multiple vendor, we can't show the order * to each seller dashboard. That's why we need to divide the main order to * some sub-orders based on the number of sellers. * * @since 3.8.0 added $force_create parameter * * @param bool $force_create if this parameter is true, if suborder is already created, they'd be deleted first * * @param int $parent_order_id * * @return void */ public function maybe_split_orders($parent_order_id, $force_create = false) { } /** * This will check if given var is empty or not. * * @since 3.6.3 * * @param mixed $item * * @return bool */ protected function is_empty($item) { } } /** * Order admin related hooks * * @since 3.8.0 moved functionality from includes/Admin/Hooks.php file */ class MiscHooks { /** * Class constructor * * @since 3.8.0 */ public function __construct() { } /** * Remove customer sensitive information while exporting order * * `customer_note` is kept, matching the vendor order details page. * * @since 3.8.0 Moved this method from Order/Hooks.php file * * @param array $headers * * @return array */ public function hide_customer_info_from_vendor_order_export($headers) { } /** * Add vendor info in restful wc_order * * @since 3.8.0 Moved this method from includes/functions.php file * * @param WP_REST_Response $response * * @return WP_REST_Response */ public function add_vendor_info_in_rest_order($response) { } /** * Modify order counts for vendor. * * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @param object $counts * * @return object $counts */ public function modify_vendor_order_counts($counts) { } } /** * Order Cache class. * * Manage all caches for order related functionalities. * * @since 3.3.2 * * @see \WeDevs\Dokan\Cache */ class OrderCache { public function __construct() { } /** * Delete order cache * * @since 3.3.2 * * @param int $seller_id * @param int|null $order_id * * @return void */ public static function delete($seller_id, $order_id = null) { } /** * Reset cache group related to seller orders. * * @since 3.3.2 * * @param int $order_id * @param int $seller_id * * @return void */ public function reset_seller_order_data($order_id, $seller_id) { } /** * Reset cache data on update WooCommerce order. * * @since 3.3.2 * * @param int $order_id * * @return void */ public function reset_order_cache($order_id) { } /** * Reset cache data on deleting WooCommerce order. * * @since 3.3.2 * * @param int $order_id * * @return void */ public function reset_cache_before_deleting_order($order_id) { } /** * This method will delete vendors best-selling product cache after a new order has been made * * @since 3.2.11 * @since 3.8.0 Moved this function from includes/wc-functions.php * * @param int $post_id */ public function clear_product_cache($order_id) { } } class OrderEventListener { public function __construct() { } /** * Perform actions after an order is trashed. * * This method is triggered when an order is moved to the trash. It updates the order status * in the Dokan tables and logs the action. * * @param int $order_id ID of the trashed order. * * @return void */ public function after_order_trash(int $order_id) { } /** * Perform actions after an order is untrashed (restored). * * This method is triggered when an order is restored from the trash. It updates the order status * in the Dokan tables and logs the action. * * @param int $order_id ID of the restored order. * * @return void */ public function after_order_untrash(int $order_id) { } /** * Update the order status in Dokan tables. * * This method updates the order status in the `dokan_orders` and `dokan_vendor_balance` tables * based on the current status of the WooCommerce order. * * @since 3.13.1 * * @param WC_Order $order The WooCommerce order object. * @param \wpdb $wpdb The WordPress database object. * @param int $order_id The ID of the order. * * @return void */ protected function process_order_status(\WC_Order $order, \wpdb $wpdb, int $order_id): void { } /** * Log order status change events. * * @param string $action The action performed (trashed/restored) * @param int $order_id The order ID * * @return void */ private function log_status_change(string $action, int $order_id): void { } } class RefundHandler implements \WeDevs\Dokan\Contracts\Hookable { /** * Register necessary WordPress hooks. * * @return void */ public function register_hooks(): void { } /** * Handle refund logic for Dokan orders. * * @since 4.0.0 * * @param int $order_id The ID of the original order. * @param int $refund_id The ID of the refund. * * @return void */ public function handle_refund(int $order_id, int $refund_id): void { } /** * Get the vendor earning amount in the refund. * * @param \WC_Order_Refund $refund_order * @param \WC_Order $order * * @return float */ public function get_vendor_earning_in_refund($refund_order, $order): float { } /** * Check the COD payment settings. * * @param bool $ret * @param \WC_Order_Refund $refund_order * @param \WC_Order $order * @return bool */ public function exclude_cod_payment($ret, $refund_order, $order) { } /** * Get the refunded tax amount for the vendor. * * @since 4.0.0 * @deprecated 5.0.10 Use OrderRefundCommission::get_vendor_tax_refund() instead. * * @param \WC_Order_Refund $refund_order The refund object. * @param \WC_Order $order The original order object. * * @return float */ protected function get_tax_refund(\WC_Order_Refund $refund_order, \WC_Order $order): float { } /** * Get the refunded shipping amount for the vendor. * * @since 4.0.0 * @deprecated 5.0.10 Use OrderRefundCommission::get_vendor_shipping_refund() instead. * * @param \WC_Order_Refund $refund_order The refund object. * @param \WC_Order $order The original order object. * * @return float */ protected function get_shipping_refund(\WC_Order_Refund $refund_order, \WC_Order $order): float { } /** * Insert a refund record into the Dokan vendor balance table. * * @since 4.0.0 * * @param float $vendor_payout_refund The vendor refund amount after the gateway fee is deducted. * @param \WC_Order_Refund $refund_order The refund order object. * @param \WC_Order $order The original order object. * @param float|null $vendor_earning_refund The vendor refund amount before the gateway fee deduction. * Falls back to $vendor_payout_refund when the action is fired * with three arguments (e.g. older Dokan Pro versions). * * @return void */ public function insert_into_balance_table($vendor_payout_refund, $refund_order, $order, $vendor_earning_refund = null) { } /** * Update order table with new refund amount * * @param float $vendor_refund * @param \WC_Order_Refund $refund_order * @param \WC_Order $order */ public function update_order_amounts($vendor_refund, $refund_order, $order) { } /** * Clear order related caches * * @param float $vendor_refund * @param \WC_Order_Refund $refund_order * @param \WC_Order $order */ public function clear_order_caches($vendor_refund, $refund_order, $order) { } } /** * Class VendorBalanceUpdateHandler. * * Handles the update of vendor balance after an order is edited. */ class VendorBalanceUpdateHandler implements \WeDevs\Dokan\Contracts\Hookable { /** * Vendor earning without refund meta key. */ public const DOKAN_VENDOR_EARNING_WITHOUT_REFUND_META_KEY = 'dokan_vendor_earning_without_refund'; /** * Register hooks. * * @return void */ public function register_hooks(): void { } /** * Handle after order object save. * * @param int $order_id Order ID. * @param WC_Order $order Order object. * * @return void */ public function handle_order_edit(int $order_id, \WC_Abstract_Order $order) { } /** * Update vendor balance entry for the order. * * @param WC_Abstract_Order $order Order. * @param float $balance New balance. * * @return bool|int */ protected function update_balance(\WC_Abstract_Order $order, float $balance) { } /** * Get order amount from vendor balance table. * * @param WC_Order $order Order. * * @return float|null */ protected function get_order_amount(\WC_Abstract_Order $order): ?float { } /** * Update dokan_orders table if necessary. * * @since 4.0.0 * * @param int $order_id Order ID. * @param WC_Abstract_Order|WC_Order $order Order object. * * @return void */ public function update_dokan_order_table(int $order_id, $order) { } /** * Remove vendor balance cache when order earning is updated. * * This function is triggered when the 'dokan_cache_deleted' action is called. * * @since 4.0.2 * * @param string $key Cache key. * @param string $group Cache group. * * @return void */ public function remove_vendor_balance_cache($key, $group) { } } } namespace WeDevs\Dokan { /** * Page views - for counting product post views. */ class PageViews { private $meta_key = 'pageview'; public function __construct() { } /** * Load the scripts * * @return void */ public function load_scripts() { } public function load_views() { } /** * Update the view count * * @param int $post_id The post ID * * @return void */ public function update_view($post_id = '') { } /** * Update the view count via AJAX * * @return void */ public function update_ajax() { } } /** * Dokan_Privacy Class. */ class Privacy extends \WC_Abstract_Privacy { /** * Init - hook into events. */ public function __construct() { } /** * Add privacy policy content for the privacy policy page. * * @since 3.4.0 */ public function get_privacy_message() { } /** * Handle some custom types of data and anonymize them. * * @param string $anonymous anonymized string * @param string $type type of data * @param string $data the data being anonymized * * @return string anonymized string */ public function anonymize_custom_data_types($anonymous, $type, $data) { } /** * Export vendor personal data * * @since 2.8.2 * * @return void */ public function vendor_data_exporter($email_address, $page) { } /** * Get vendor pers * * @since 2.8.2 * * @return void */ public function get_vendor_personal_data($user) { } /** * Vendor Data Eraser. * * @since 2.8.2 * * @return array */ public function vendor_data_eraser($email_address, $page) { } /** * Errase array data * * @since 2.8.2 * * @param array * * @return array */ public function erase_array_data(&$data) { } } } namespace WeDevs\Dokan\Product { /** * Admin Hooks * * @since 3.0.0 * * @package dokan */ class Hooks { /** * Load autometically when class initiate * * @since 3.0.0 */ public function __construct() { } /** * Callback for Ajax Action Initialization * * @since 3.8.2 * @return void */ public function store_product_search_action() { } /** * Output the store product sorting options * * @since 3.8.2 * @return void */ public function store_products_orderby() { } /** * Change bulk product status in vendor dashboard * * @since 2.8.6 * @return void */ public function bulk_product_status_change() { } /** * Bulk product delete * * @param string $action * @param object $products * * @return void */ public function bulk_product_delete($action, $products) { } /** * Triggers when admin quick edits products or bulk edit products from admin panel. * we are auto selecting all category ancestors here. * * @since 3.6.4 * * @param object $product * * @return void */ public function update_category_data_for_bulk_and_quick_edit($product) { } /** * Triggers when admin saves/edits products. * we are auto selecting all category ancestors here. * * @since 3.6.4 * * @param int $product_id * * @return void */ public function update_category_data_for_new_and_update_product($product_id) { } /** * Gets chosen categories and updated product categories. * * @since 3.6.4 * * @param int $product_id * * @return void */ private function update_product_categories($product_id) { } /** * Set product edit status * * @since 3.8.2 * * @param int $product_id * * @param array $all_statuses * * @return array */ public function set_product_status($all_statuses, int $product_id) { } /** * Set new product email status to false * * @since 3.8.2 * * @param int|WC_Product $product_id * * @return void */ public function set_new_product_email_status($product_id) { } /** * Remove product type filter if dokan pro does not exist. * * @since 3.8.2 * * @param array $args * * @return array */ public function remove_product_type_filter($args) { } /** * Display own product not punchable notice. * * @since 3.9.2 * * @return void */ public function own_product_not_purchasable_notice() { } /** * Filter the recipients of the product review notification. * * Right now, if someone leaves a review for a vendor product, the vendor is receiving a notification email. * This email notification should be sent to the admin instead of the vendor. * * @since 3.9.2 * * @param array $emails * @param int $comment_id * * @return array */ public function product_review_notification_recipients($emails, $comment_id) { } /** * Add per product commission options * Moved from dokan pro in version 3.14.0 * * @since 2.4.12 * * @return void */ public function add_per_product_commission_options() { } /** * Save per product commission options * Moved from dokan pro in version 3.14.0 * * @since 2.4.12 * * @param integer $post_id * @param array $data * * @return void */ public static function save_per_product_commission_options($post_id, $data = []) { } /** * Add product brand taxonomy template * * @since 4.2.6 * * @return void */ public function add_product_brand_template_in_add_product(): void { } /** * Add product brand taxonomy template * * @since 4.0.4 * * @param \WP_Post $post The post object of the product being edited. * * @return void */ public function add_product_brand_template_in_edit_product(\WP_Post $post): void { } /** * Update product brands * * @since 4.0.4 * * @param int $product_id The ID of the product being updated. * @param array $product_data The product data containing brand information. * * @return void */ public function update_product_brands_by_id(int $product_id, array $product_data = array()): void { } /** * Sync category data for commission * * @since 5.0.6 * * @param int $product_id The ID of the product being created or updated. * * @return void */ public function sync_category_data_for_commission(int $product_id): void { } } /** * Product manager Class * * @since 3.0.0 */ class Manager { /** * Get all Product for a vendor * * @since 1.0.0 * * @return \WP_Post[] */ public function all($args = []) { } /** * Get single product * * @since 3.0.0 * * @return WC_Product|null|false */ public function get($product_id) { } /** * Save Product * * @since 3.0.0 * * @throws \WC_Data_Exception * @return WC_Product|null|false */ public function create($args = []) { } /** * Save default attributes. * * @since 3.0.0 * * @param WC_Product $product Product instance. * @param \WP_REST_Request $request Request data. * * @return WC_Product */ public function save_default_attributes($product, $request) { } /** * Update product data * * @since 3.0.0 * * @return WC_Product|WP_Error|false */ public function update($args = []) { } /** * Delete product data * * @since 3.0.0 * * @return WC_Product|null|false */ public function delete($product_id, $force = false) { } /** * Save product shipping data. * * @param WC_Product $product Product instance. * @param array $data Shipping data. * * @return WC_Product */ protected function save_product_shipping_data($product, $data) { } /** * Save taxonomy terms. * * @param WC_Product $product Product instance. * @param array $terms Terms data. * @param string $taxonomy Taxonomy name. * * @return WC_Product */ protected function save_taxonomy_terms($product, $terms, $taxonomy = 'cat') { } /** * Save downloadable files. * * @param WC_Product $product Product instance. * @param array $downloads Downloads data. * * @return WC_Product */ protected function save_downloadable_files($product, $downloads) { } /** * Sync stock stats for variable products. * * @since 3.4.0 * * @param WC_Product $product * @param string $stock_status * * @return mixed */ protected function maybe_update_stock_status($product, $stock_status) { } /** * Get featured products * * @since 1.0.0 * * @param array $args * * @return \WP_Post[] */ public function featured($args = []) { } /** * Get latest product * * @since 1.0.0 * * @param array $args * * @return \WP_Post[] */ public function latest($args = []) { } /** * Best Selling Products * * @since 3.0.0 * * @param array $args * * @return \WP_Post[] */ public function best_selling($args = []) { } /** * Top-rated product * * @since 3.0.0 * * @param array $args * * @return \WP_Post[] */ public function top_rated($args = []) { } /** * Validate product id (if it's a variable product, return it's parent id) * * Moved from \WeDevs\Dokan\Commission() ( commission.php file ) in version 3.14.0 * * @since 2.9.21 * * @param int $product_id * * @return int */ public function validate_product_id($product_id) { } /** * Returns product commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get_commission_settings($product_id = 0) { } /** * Saves and returns product commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function save_commission_settings($product_id, $commission) { } /** * Set product brands. * * @since 4.0.4 * * @param int $product_id Product ID. * @param array $brands Array of brand IDs. */ public function save_brands(int $product_id, array $brands) { } /** * Get product brands. * * @since 4.0.4 * * @param int $product_id Product ID. * @param string $fields Fields to return. Default is 'all'. Other options are 'ids', 'names', 'slugs', 'count', 'all_with_object_id'. * * @return array */ public function get_brands(int $product_id, string $fields = 'all'): array { } /** * Get product brand IDs. * * @since 4.0.4 * * @param int $product_id Product ID. * * @return array */ public function get_brand_ids(int $product_id): array { } } /** * Manage Product Attributes. * * @package dokan * * @since 3.7.10 */ class ProductAttribute { /** * Request attributes. * * @since 3.7.10 * * @var array */ public $request_attributes; /** * Class constructor. * * @since 3.7.10 * * @param array $attrs */ public function __construct($attrs = null) { } /** * Set request attributes. * * @since 3.7.10 * * @param array $attrs * * @return self */ public function set_request_attributes($attrs = []) { } /** * Get product attributes by product id. * * @since 3.7.10 * * @param int $post_id * @return array $product_attributes */ public function get($post_id) { } /** * Set and save product attributes. * * @since 3.7.10 * * @param WC_Product $product * @param boolean $needs_save * * @example $request_attributes * ``` * $request_attributes = [ * { * "id": 6, * "name": "Color", * "position": 0, * "visible": false, * "variation": true, * "options": [ * "Black", * "Green" * ] * }, * { * "name": "Custom Attribute", * "position": 1, * "visible": true, * "variation": false, * "options": [ * "Value 1", * "Value 2" * ] * }, * ] * * @return WC_Product|boolean */ public function set(&$product, $needs_save = false) { } /** * Set default attribute for product. * * @since 3.7.10 * * @param WC_Product $product * @param boolean $needs_save * * @return WC_Product|boolean */ public function set_default(&$product, $needs_save = false) { } } /** * Product Cache class. * * Manage all caches for products. * * @since 3.3.2 * * @see \WeDevs\Dokan\Cache */ class ProductCache { public function __construct() { } /** * Reset cache group related to seller products. * * @since 3.3.2 * * @param int|\WC_Product $product * * @return void */ public function clear_seller_product_caches($product) { } /** * Delete cache group related to seller products. * * @since 3.3.2 * * @param int $seller_id * * @return void */ public static function delete($seller_id) { } /** * Clear Single Product Caches. * * We'll be calling `WC_Product_Data_Store_CPT::clear_caches()` to clear product caches. * * @since 3.3.2 * * @param int|\WC_Product $product * * @return void */ public function clear_single_product_caches($product) { } /** * Clear Single Product taxonomy Caches. * * @since 3.5.0 * * @param int|\WC_Product $product * * @return void */ public function clear_single_product_taxonomy_caches($product) { } /** * Clear Cache on bulk product status change. * * @since 3.3.2 * * @param string $status * @param array $products * * @return void */ public function cache_clear_bulk_product_status_change($status, $products) { } } /** * Vendor information handler class */ class VendorStoreInfo { /** * Class constructor * * @since 3.3.7 */ public function __construct() { } /** * Display seller info on product single page * * @since 3.3.7 * * @return void */ public function add_vendor_info_on_product_single_page() { } /** * Add setting fields for seller information * * @param array $settings_fields * * @param object $dokan_settings * * @return array */ public function admin_settings_for_vendor_info($settings_fields, $dokan_settings) { } } } namespace WeDevs\Dokan\ProductCategory { class Categories { /** * @var array * * @since 3.6.2 */ private $categories = []; /** * This method will return all the categories * * @since 3.6.4 * * @return void|array */ public function get_all_categories($ret = false) { } /** * This method will return category data * * @sience 3.6.2 * * @return array */ public function get() { } /** * Sets categories. * * @since 3.7.0 * * @param array $categories * * @return void */ public function set_categories($categories = []) { } /** * Get Children of a parent category * * @since 3.6.4 * * @param int $parent_id * * @return int[] */ public function get_children($parent_id) { } /** * Get all the parents of a category. * * @since 3.6.4 * * @param int $category_id * * @return array */ public function get_parents($category_id) { } /** * Returns the top patent id of a category. * * @since 3.6.4 * * @param int $category_id * * @return int */ public function get_topmost_parent($category_id) { } /** * This method will prepare category data * * @since 3.6.2 * * @return void */ private function get_categories() { } /** * This method will recursively get parent id of a category * * @sience 3.6.2 * * @param int $current_item * * @return void */ private function recursively_get_parent_categories($current_item) { } } /** * Product category helper class. * * @since 3.6.2 */ class Helper { /** * Returns 'true' if category type selection for Products is single, 'false' if type is multiple * * @since 3.6.2 * * @return boolean */ public static function product_category_selection_is_single() { } /** * Returns 'true' if select any category option is turned on. * * @since 3.7.15 * * @return boolean */ public static function is_any_category_selection_enabled() { } /** * Returns products category. If the category selection is single, it will return the first category of the product. * If the category selection is multiple, it will return all the categories of the product. * If the category selection is single and the product has multiple categories, it will return the first category. * If you want to get the chosen category of a product as it is saved in the database and not considering the category selection setting, * then use the function self::get_product_chosen_category * * @see self::get_product_chosen_category * * @since 3.6.2 * * @param integer $post_id * @param boolean $get_default_cat * * @return array */ public static function get_saved_products_category($post_id = 0, $get_default_cat = true) { } /** * Fotomat's chosen cates for generate chosen cats. * * @since 3.7.0 * * @param array $all_children * @param array $all_ancestors * * @return array */ private static function get_formatted_chosen_cat($all_children, $all_ancestors) { } /** * Generates chosen categories from categories/terms array * * @since 3.6.4 * * @param array $terms * * @return array */ public static function generate_chosen_categories($terms) { } /** * Set all ancestors to a product from chosen product categories * * @since 3.6.2 * * @param int $post_id * @param array $chosen_categories * * @return void */ public static function set_object_terms_from_chosen_categories($post_id, $chosen_categories = []) { } /** * Get category ancestors HTML; * * @since 3.6.2 * * @param integer $term * * @return string */ public static function get_ancestors_html($term) { } /** * Enqueue styles and scripts and localize for dokan multi-step category. * * @since 3.7.0 * * @return void */ public static function enqueue_and_localize_dokan_multistep_category() { } /** * Returns the chosen category of a product. * The purpose of this function is to get the chosen category of a product. It will return the category ids as saved * in the database. it will not consider if the setting in dokan setting is single or multiple category selection. * It will return the saved category ids as it is. And if the product is a variation product, it will find the parent * product id and return the chosen category of the parent product. * * It is not recommended to use this function to get the chosen category of a product by the chosen category setting. * Instead, use the function self::get_saved_products_category * * @see self::get_saved_products_category * * @since 3.7.0 * * @param int $product * * @return array */ public static function get_product_chosen_category($product) { } /** * Generates and sets products categories. * * @since 3.7.16 * * @param int $product_id * * @return array $chosen_categories */ public static function generate_and_set_chosen_categories($product_id, $chosen_categories = []) { } /** * @param int|WC_Product $product * * @return array|\WP_Error */ public static function get_product_terms($product) { } /** * Get product categories in a fully hierarchical (recursive) format for JS consumption. * * @since 4.0.2 * * @return array */ public static function get_product_categories_tree($with_term = false): array { } /** * Get all ancestors of chosen categories. * * @since 5.0.0 * * @param \WC_Product|int $product * @param array $chosen_categories * * @return array */ public static function get_object_terms_from_chosen_categories($product, $chosen_categories = []) { } } /** * Hooks class for product categories. * * @since 3.6.2 */ class Hooks { /** * Class constructor. * * @since 3.6.2 */ public function __construct() { } /** * Delete all references for chosen_product_cat with category id under postmeta table. * * @since 3.6.2 * * @param array $results * * @return void */ public function delete_reference_category_from_chosen_cat($results = []) { } /** * Add categories to action scheduler queue to delete the chosen cat reference from post meta. * * @param int $category_id * * @since 3.6.2 * * @return void */ public function add_chosen_categories_to_action_queue($category_id) { } } /** * Product category Cache class. * * Manage all caches for product category related functionalities. * * @since 3.6.2 * * @see \WeDevs\Dokan\Cache */ class ProductCategoryCache { public function __construct() { } /** * Delete product category cache * * @since 3.6.2 * * @return void */ public function clear_multistep_category_cache() { } /** * This method will delete store category cache after a category is updated * * @since 3.2.10 * @since 3.8.0 Moved this method from includes/wc-functions.php file * * @param int $term_id */ public function clear_product_category_cache($term_id) { } } } namespace WeDevs\Dokan\ProductEditor { /** * Product Form Elements * * @since 5.0.0 */ class Elements { // Section ids. const SECTION_GENERAL = 'general'; const SECTION_INVENTORY = 'inventory'; const SECTION_DOWNLOADABLE = 'downloadable_options'; const SECTION_OTHERS = 'others'; const SECTION_SHIPPING = 'shipping'; const SECTION_ATTRIBUTES_AND_VARIATIONS = 'attributes-and-variations'; const PRODUCT_TYPE_SIMPLE = 'simple'; const PRODUCT_TYPE_VARIABLE = 'variable'; const PRODUCT_TYPE_GROUPED = 'grouped'; const PRODUCT_TYPE_EXTERNAL = 'external'; const PRODUCT_TYPE_VARIATION = 'variation'; const SECTION_LINKED = 'linked'; // Layout IDs. const ROOT_LAYOUT = 'root_layout'; const PRIMARY_COLUMN = 'primary_column'; const SIDEBAR_COLUMN = 'sidebar_column'; const SECTION_DIGITAL_OPTIONS = 'digital_options'; const SECTION_DISCOUNT_SCHEDULE = 'discount_schedule'; const SECTION_DESCRIPTION = 'description_section'; const SECTION_SHIPPING_DIMENSIONS = 'shipping_dimensions'; const SECTION_SHIPPING_OVERWRITE = 'shipping_overwrite'; const SECTION_PUBLISHING = 'product_publishing'; const SECTION_PURCHASE_NOTE = 'purchase_note_section'; const ID = 'id'; const TYPE = 'type'; const NAME = 'name'; const DESCRIPTION = 'description'; const ENABLED = 'enabled'; const SHORT_DESCRIPTION = 'short_description'; const STATUS = 'status'; const SLUG = 'slug'; const MENU_ORDER = 'menu_order'; const REVIEWS_ALLOWED = 'reviews_allowed'; const VIRTUAL = 'virtual'; const TAX_STATUS = 'tax_status'; const TAX_CLASS = 'tax_class'; const CATALOG_VISIBILITY = 'catalog_visibility'; const PURCHASE_NOTE = 'purchase_note'; const FEATURED = 'featured'; const SKU = 'sku'; const GLOBAL_UNIQUE_ID = 'global_unique_id'; const WEIGHT = 'weight'; const DIMENSIONS = 'dimensions'; const DIMENSIONS_HEIGHT = 'height'; const DIMENSIONS_WIDTH = 'width'; const DIMENSIONS_LENGTH = 'length'; const SHIPPING_CLASS = 'shipping_class'; const ATTRIBUTES = 'attributes'; const ATTRIBUTES_ID = 'id'; const ATTRIBUTES_NAME = 'name'; const ATTRIBUTES_OPTIONS = 'options'; const ATTRIBUTES_POSITION = 'position'; const ATTRIBUTES_VISIBLE = 'visible'; const ATTRIBUTES_VARIATION = 'variation'; const DEFAULT_ATTRIBUTES = 'default_attributes'; const REGULAR_PRICE = 'regular_price'; const SALE_PRICE = 'sale_price'; const DATE_CREATED = 'date_created'; const DATE_CREATED_GMT = 'date_created_gmt'; const DATE_ON_SALE_FROM = 'date_on_sale_from'; const DATE_ON_SALE_FROM_GMT = 'date_on_sale_from_gmt'; const DATE_ON_SALE_TO = 'date_on_sale_to'; const DATE_ON_SALE_TO_GMT = 'date_on_sale_to_gmt'; const PARENT_ID = 'parent_id'; const SOLD_INDIVIDUALLY = 'sold_individually'; const LOW_STOCK_AMOUNT = 'low_stock_amount'; const STOCK_STATUS = 'stock_status'; const MANAGE_STOCK = 'manage_stock'; const BACKORDERS = 'backorders'; const STOCK_QUANTITY = 'stock_quantity'; const INVENTORY_DELTA = 'inventory_delta'; const UPSELL_IDS = 'upsell_ids'; const CROSS_SELL_IDS = 'cross_sell_ids'; const CATEGORIES = 'category_ids'; const TAGS = 'product_tag'; const BRANDS = 'product_brand'; const DOWNLOADABLE = 'downloadable'; const DOWNLOADS = 'downloads'; const DOWNLOAD_LIMIT = 'download_limit'; const DOWNLOAD_EXPIRY = 'download_expiry'; const EXTERNAL_URL = 'external_url'; const BUTTON_TEXT = 'button_text'; const GROUPED_PRODUCTS = 'grouped_products'; const FEATURED_IMAGE_ID = 'image_id'; const GALLERY_IMAGE_IDS = 'gallery_image_ids'; const META_DATA = 'meta_data'; const DISABLE_SHIPPING_META = '_disable_shipping'; const OVERWRITE_SHIPPING_META = '_overwrite_shipping'; const ADDITIONAL_SHIPPING_COST_META = '_additional_price'; const ADDITIONAL_SHIPPING_QUANTITY_META = '_additional_qty'; const ADDITIONAL_SHIPPING_PROCESSING_TIME_META = '_dps_processing_time'; const CREATE_SCHEDULE_FOR_DISCOUNT = 'create_schedule_for_discount'; } /** * Product form schema, data resolution, and product form support. * * @since 5.0.0 */ class FormSchema { /** * Required field attributes * * @since 5.0.0 * * @var array $required_fields */ private array $required_fields = ['id', 'type', 'variant', 'label']; /** * Supported field types. * * @since 5.0.0 * * @var array */ private array $supported_types = ['section', 'field']; /** * Supported field variants. * * @since 5.0.0 * * @var array */ private array $supported_variants = ['text', 'select', 'multiselect', 'async_select', 'checkbox', 'textarea', 'editor', 'radio', 'number', 'file', 'datetime', 'image', 'gallery', 'attribute', 'location_map']; /** * Validate field schema and log developer notices for invalid fields. * * @since 5.0.0 * * @param array $fields Form schema fields to validate. * * @return array The same fields array (unmodified). */ private function assert_field_schema(array $fields): array { } /** * Find a field in a flat schema by id. * * Sections and fields share one id namespace, so the type is part of the match: a section - or an item an * extension adds through `dokan_product_editor_prepared_schema` - carrying the same id must not answer for * the field, since it has no `requireds` map and would silently switch a rule off. * * @since 5.0.16 * * @param array $schema Flat schema items. * @param string $id Field id to find. * * @return array|null */ public static function get_field(array $schema, string $id): ?array { } /** * Resolve a field's label for a product type, falling back to its shared label. * * Fields can vary by product type through the `labels`, `requireds` and `visibilities` maps, which * Dokan Pro's Product Form Manager writes into. These three resolvers are the PHP counterpart of * `resolveLabel`, `resolveRequired` and `resolveVisibility` in * `src/dashboard/product-editor/utils.tsx`, so both sides read the schema the same way. * * @since 5.0.16 * * @param array $field Schema field. * @param string $product_type Product type the field is resolved for. * * @return string */ public static function get_label(array $field, string $product_type = \WeDevs\Dokan\ProductEditor\Elements::PRODUCT_TYPE_SIMPLE): string { } /** * Whether a field must be filled in for a product type. * * @since 5.0.16 * * @param array $field Schema field. * @param string $product_type Product type the field is resolved for. * * @return bool */ public static function is_required(array $field, string $product_type = \WeDevs\Dokan\ProductEditor\Elements::PRODUCT_TYPE_SIMPLE): bool { } /** * Whether a field is rendered for a product type. * * @since 5.0.16 * * @param array $field Schema field. * @param string $product_type Product type the field is resolved for. * * @return bool */ public static function is_visible(array $field, string $product_type = \WeDevs\Dokan\ProductEditor\Elements::PRODUCT_TYPE_SIMPLE): bool { } /** * Get available product types as label/value pairs. * * @since 5.0.0 * * @return array */ public function get_product_types(): array { } /** * Get the flat layout definition. * * Predefined items are sorted by array position. * Extensions can set an optional `priority` key to control insertion order * when adding items via the `dokan_product_editor_layouts` filter. * * @since 5.0.0 * * @return array Flat array of layout items. */ public static function get_layouts(): array { } /** * Get flat form schema (sections and fields). Resolves field values when $product_id is provided. * * @since 5.0.0 * @param int $product_id Optional. Product ID to resolve values from. * @return array Form schema items (sections and fields). */ public function get_schema(int $product_id = 0): array { } /** * Resolve and format values for a set of schema fields against a product. * * Lets callers that already hold field definitions resolve per-product * values without rebuilding the whole schema. The frontend variation * renderer uses this to avoid one full schema build per variation. * * @since 5.0.5 * * @param array $fields Schema field items (each with at least 'id', 'type', 'variant'). * @param WC_Product $product Product to resolve values against. * * @return array Map of field id => formatted value. */ public function get_field_values(array $fields, \WC_Product $product): array { } /** * Format a resolved field value to the shape expected by the frontend based on variant. * * Resolve_field_value() returns raw values (int, array of ints, etc.). * This method transforms them to the structured shape the React frontend expects. * * @since 5.0.0 * * @param mixed $value Raw resolved value. * @param string $variant Field variant type. * * @return mixed Formatted value. */ private function format_field_value($value, string $variant) { } /** * Resolve a field's value from product. Mirrors Field::get_value() and original value_callback logic. * * @param string $field_id Field id (Elements constant value, e.g. Elements::REVIEWS_ALLOWED). * @param WC_Product $product Product instance. * @return mixed */ private function resolve_field_value(string $field_id, \WC_Product $product) { } /** * Get product tags for form options. * * @since 5.0.0 * * @return array */ public static function get_product_tags(): array { } /** * Convert a list of term IDs to async-select options: [ { value, label }, ... ]. * * Used by async-select fields (e.g. tags) so the currently selected terms render * their labels without embedding the whole taxonomy in the form schema. * * @since 5.0.5 * * @param array $term_ids Term IDs. * @param string $taxonomy Taxonomy name. * * @return array */ public static function terms_to_async_options(array $term_ids, string $taxonomy): array { } /** * Get product brands recursively for form options. * * @since 5.0.0 * * @param int $parent_id Parent term ID (0 for top-level). * * @return array */ public static function get_products_brands(int $parent_id = 0): array { } } /** * Resolves product form payload (schema field ids) to WooCommerce REST API shape. * Allows the frontend to send data keyed by form field id; server resolves to API keys. * * @since 5.0.0 */ class PayloadResolver { /** * Transform request body from schema field ids to WC REST product API shape. * When schema keys are present they are mapped and removed; existing API keys are kept. * * @since 5.0.0 * * @param array $data Request body (e.g. from get_json_params()). * * @return array Data suitable for WC REST product create/update. */ public static function resolve(array $data): array { } /** * Unwrap single-element arrays to scalar strings for fields the WC REST API * expects as plain strings (e.g. select variant fields like tax_status). * * The DataForm select component sends values as arrays (e.g. ['taxable']). * WooCommerce product setters expect plain strings. * * @since 5.0.0 */ public function resolve_single_select_fields(array $data): array { } /** * Cast numeric string fields to integers for the WC REST API. * * @since 5.0.0 */ public function resolve_integer_fields(array $data): array { } /** * Transform taxonomy fields (categories, tags, brands) from flat ID arrays * to the WC REST API format: [ { id: int }, ... ]. * * @since 5.0.0 */ public function resolve_taxonomies(array $data): array { } /** * Map tag IDs and (when vendors can create tags) new-name strings to the WC REST tag shape. * * @since 5.0.4 * * @param array $tags Array of tag IDs and/or new tag names. * * @return array of tag objects for WC REST API: [ { id: int } | { name: string }, ... ]. */ public function map_tags_to_objects(array $tags): array { } /** * Transform featured image and gallery image IDs into the WC REST images array. * * Every entry carries a `position` — 0 for the featured image, 1..n for the gallery — because * the flat array on its own cannot express a product that has gallery images but no featured * image. This mirrors the convention ProductController (v1) already splits on; WooCommerce's * own v3 images schema has no `position`, and ignores the key while preserving it, since that * schema sets no `additionalProperties`. ProductControllerV3::apply_image_positions() is the * only consumer. * * The two fields compile into one WooCommerce array, so a request carrying either of them * describes the product's whole image state — sending only one clears the other side. * * @since 5.0.0 * * @param array $data Request body keyed by schema field id. * * @return array */ public function resolve_images(array $data): array { } /** * Combine individual dimension fields into a nested dimensions object. * * @since 5.0.0 */ public function resolve_dimensions(array $data): array { } /** * Normalize linked product fields (upsells, cross-sells, grouped) to integer ID arrays. * * @since 5.0.0 */ public function resolve_linked_products(array $data): array { } /** * Transform attributes to the WC REST API shape. * * @since 5.0.0 */ public function resolve_attributes(array $data): array { } /** * Transform attributes array to WC REST product schema (options as string array). * * @since 5.0.0 * * @param array $attributes List of attribute objects. * * @return array */ public function transform_attributes(array $attributes): array { } /** * Convert an array of IDs to WC REST taxonomy format: [ { id: int }, ... ]. * * @since 5.0.0 * * @param array $ids Flat array of term IDs. * * @return array Array of objects with 'id' key. */ public function map_ids_to_objects(array $ids): array { } /** * Extract an image ID from either a plain integer or an array with 'id' key. * * @since 5.0.0 * * @param array|int|string $image Image data. * * @return int */ public function extract_image_id($image): int { } /** * Extract a product ID from mixed input formats (plain int, array with value/id key, object). * * @since 5.0.0 * * @param array|object|int|string $item Product reference. * * @return int */ public function extract_product_id($item): int { } /** * Resolve additional fields like sale schedule into their API representations. * * @since 5.0.0 */ public function resolve_additional_fields(array $data): array { } } } namespace WeDevs\Dokan\ProductSections { /** * Single store products class. * * For displaying additional products sections to single store page. * * @since 3.3.7 * * @package dokan */ abstract class AbstractProductSection { /** * Unique section id. * * @since 3.3.7 * * @var string */ protected $section_id; /** * Show this section under customizer. * * @since 3.3.7 * * @var bool */ protected $show_in_customizer = true; /** * Products to display in this sections. * * @since 3.3.7 * * @var int */ protected $item_count = 3; /** * AbstractProductSection constructor. * * @since 3.3.7 * * @return void */ public function __construct() { } /** * Set unique section id for the this section. * * @since 3.3.7 * * @return void */ abstract protected function set_section_id(); /** * Get single store page section title. * * @since 3.3.7 * * @return string */ abstract public function get_section_title(); /** * Get label for this section. * * @since 3.3.7 * * @return string */ abstract public function get_section_label(); /** * Get products for this section * * @since 3.3.7 * * @return \WP_Query */ abstract public function get_products($vendor_id); /** * Get unique section id for this section. * * @since 3.3.7 * * @return string */ public function get_section_id() { } /** * Set if need admin customizer settings for this section or not. * * @since 3.3.7 * * @return void */ public function set_show_in_customizer($value) { } /** * Check if admin customizer settings is enabled for this section or not. * * @since 3.3.7 * * @return bool */ public function get_show_in_customizer() { } /** * Check products block visibility settings by admin and vendor. * * @since 3.3.7 * * @return bool */ public function is_enabled() { } } /** * Best Selling products section class. * * For displaying best selling products section to single store page. * * @since 3.3.7 * * @package dokan */ class BestSelling extends \WeDevs\Dokan\ProductSections\AbstractProductSection { /** * Set unique section id for the this section. * * @since 3.3.7 * * @return void */ protected function set_section_id() { } /** * Get single store page section title. * * @since 3.3.7 * * @return string */ public function get_section_title() { } /** * Get label for this section. * * @since 3.3.7 * * @return string */ public function get_section_label() { } /** * Get section products. * * @since 3.3.7 * * @return \WP_Query */ public function get_products($vendor_id) { } } /** * Featured products section class. * * For displaying featured products section to single store page. * * @since 3.3.7 * * @package dokan */ class Featured extends \WeDevs\Dokan\ProductSections\AbstractProductSection { /** * Set unique section id for the this section. * * @since 3.3.7 * * @return void */ protected function set_section_id() { } /** * Get single store page section title. * * @since 3.3.7 * * @return string */ public function get_section_title() { } /** * Get label for this section. * * @since 3.3.7 * * @return string */ public function get_section_label() { } /** * Get section products. * * @since 3.3.7 * * @return \WP_Query */ public function get_products($vendor_id) { } } /** * Latest products section class. * * For displaying latest products section to single store page. * * @since 3.3.7 * * @package dokan */ class Latest extends \WeDevs\Dokan\ProductSections\AbstractProductSection { /** * Set unique section id for the this section. * * @since 3.3.7 * * @return void */ protected function set_section_id() { } /** * Get single store page section title. * * @since 3.3.7 * * @return string */ public function get_section_title() { } /** * Get label for this section. * * @since 3.3.7 * * @return string */ public function get_section_label() { } /** * Get section products. * * @since 3.3.7 * * @return \WP_Query */ public function get_products($vendor_id) { } } /** * Dokan store products section manager class * * @since 3.3.7 */ class Manager { use \Wedevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.3.7 */ public function __construct() { } /** * Register all products section classes to chainable container * * @since 3.3.7 * * @return void */ public function init_classes() { } /** * Init required hooks * * @since 3.3.7 * * @return void */ public function init_hooks() { } /** * Render customizer settings fields. * * @since 3.3.7 * * @param object $wp_customize * * @return void */ public function render_customizer_settings_fields($wp_customize) { } /** * Render additional products section. * * @since 3.3.7 * * @param \WP_User $store_user Store user data * @param array $store_info Store info data * @param Vendor $vendor Vendor class instance * * @return void */ public function render_additional_product_sections($store_user) { } /** * Get available product sections * * @since 3.3.7 * * @return array */ public function get_available_product_sections() { } } /** * Top rated products section class. * * For displaying top rated products section to single store page. * * @since 3.3.7 * * @package dokan */ class TopRated extends \WeDevs\Dokan\ProductSections\AbstractProductSection { /** * Set unique section id for the this section. * * @since 3.3.7 * * @return void */ protected function set_section_id() { } /** * Get single store page section title. * * @since 3.3.7 * * @return string */ public function get_section_title() { } /** * Get label for this section. * * @since 3.3.7 * * @return string */ public function get_section_label() { } /** * Get section products. * * @since 3.3.7 * * @return \WP_Query */ public function get_products($vendor_id) { } } } namespace WeDevs\Dokan { /** * Class to handle product status rollback operations. * * Dokan pro schedule an action during deactivation to change product status from `reject` to `draft`. */ class ProductStatusRollback implements \WeDevs\Dokan\Contracts\Hookable { /** * Queue group identifier * * @var string */ private const QUEUE_GROUP = 'dokan-product-status-rollback'; /** * Batch size for processing * * @var int */ private const BATCH_SIZE = 10; /** * Constructor. * * @since 3.14.9 */ public function __construct() { } /** * Set up necessary hooks * * @since 3.14.9 * * @return void */ public function register_hooks(): void { } /** * Process reject to draft batch operation * * @since 3.14.9 * * @return void */ public function process_reject_operation(): void { } } } namespace WeDevs\Dokan\REST { /** * Admin Dashboard * * @since 2.8.0 * * @package dokan */ class AdminDashboardController extends \WeDevs\Dokan\Abstracts\DokanRESTAdminController { /** * Route base. * * @var string */ protected $base = 'dashboard'; /** * Register all routes releated with stores * * @return void */ public function register_routes() { } /** * Get rss feeds * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function get_feeds($request) { } public function get_status($request) { } /** * Support SimplePie class in WP 5.5+ * * @since 3.0.10 * * @param array $response HTTP response. * @param array $parsed_args HTTP request arguments. * @param string $url The request URL. * * @return array */ public static function dokan_compat_simple_pie_after_five_point_five($response, $parsed_args, $url) { } } /** * Todo Dashboard API Controller * * Handles todo endpoint requests * * @since 4.1.0 */ class AdminDashboardStatsController extends \WeDevs\Dokan\REST\DokanBaseAdminController { /** * Route base. * * @var string */ protected $rest_base = 'dashboard'; /** * Register all routes related with todo * * @return void */ public function register_routes() { } /** * Get to_do data * * @since 4.1.0 * * @return WP_REST_Response */ public function get_to_do() { } /** * Get analytics data. * * @since 4.1.0 * * @return WP_REST_Response */ public function get_analytics_data() { } /** * Get monthly_overview data * * @since 4.1.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_monthly_overview_data($request) { } /** * Get sales_chart data * * @since 4.1.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_sales_chart_data($request) { } /** * Get all_time_stats data * * @since 4.1.0 * * @return WP_REST_Response */ public function get_all_time_stats_data() { } /** * Get top_performing_vendors data * * @since 4.1.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_top_performing_vendors_data($request) { } /** * Get most_reviewed_products data * * @since 4.1.0 * * @return WP_REST_Response */ public function get_most_reviewed_products_data() { } /** * Get vendor_metrics data * * @since 4.1.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_vendor_metrics_data($request) { } /** * Get vendor approvals count * * @since 4.1.0 * * @return int */ public function get_vendor_approvals_count() { } /** * Get product approvals count * * @since 4.1.0 * * @return int */ public function get_product_approvals_count() { } /** * Get pending withdrawals count * * @since 4.1.0 * * @return int */ public function get_pending_withdrawals_count() { } /** * Get top-performing vendors * * @since 4.1.0 * * @param string $date The date for which to get the vendor data (optional). * * @return array */ public function get_top_performing_vendors($date = '') { } /** * Get most reviewed products * * @since 4.1.0 * * @return array */ public function get_most_reviewed_products() { } /** * Get all time marketplace stats * * @since 4.1.0 * * @return array */ public function get_all_time_stats() { } /** * Get sales chart data for the current month * * @since 4.1.0 * * @param string $date The date for which to get the sales data (optional). * * @return array */ public function get_sales_chart($date = '') { } /** * Get vendor metrics data * * @since 4.1.0 * * @param string $date * * @return array */ public function get_vendor_metrics(string $date = ''): array { } /** * Get monthly overview data * * @since 4.1.0 * * @param string $date * * @return array */ public function get_monthly_overview($date) { } /** * Parse date and return formatted date ranges * * @since 4.1.0 * * @param string $date The date string in Y-m format (optional) * * @return array Array containing parsed date information */ public function parse_date_range($date = '') { } /** * Get filtered product types * * @since 4.1.0 * * @return array */ public function get_filtered_product_types() { } /** * Get schema for todo endpoint * * @since 4.1.0 * * @return array */ public function get_todo_schema() { } /** * Get schema for analytics endpoint * * @since 4.1.0 * * @return array */ public function get_analytics_schema() { } /** * Get schema for monthly overview endpoint * * @since 4.1.0 * * @return array */ public function get_monthly_overview_schema() { } /** * Get schema for sales chart endpoint * * @since 4.1.0 * * @return array */ public function get_sales_chart_schema() { } /** * Get schema for all-time stats endpoint * * @since 4.1.0 * * @return array */ public function get_all_time_stats_schema() { } /** * Get schema for top performing vendors endpoint * * @since 4.1.0 * * @return array */ public function get_top_performing_vendors_schema() { } /** * Get schema for most reviewed products endpoint * * @since 4.1.0 * * @return array */ public function get_most_reviewed_products_schema() { } /** * Get schema for vendor metrics endpoint * * @since 4.1.0 * * @return array */ public function get_vendor_metrics_schema() { } } /** * Admin Extensions REST Controller. * * Handles plugin installation from the extensions page. * * @since SUSPENDED */ class AdminExtensionsController extends \WeDevs\Dokan\REST\DokanBaseAdminController { /** * Route base. * * @var string */ protected $rest_base = 'extensions'; /** * Register routes. * * @since SUSPENDED * * @return void */ public function register_routes() { } /** * Check whether the current user may install plugins through this controller. * * Deliberately stricter than the admin base check: this route downloads code from * wordpress.org, and `manage_woocommerce` is a capability a Shop Manager holds * without holding `install_plugins`. Scoped to the install route rather than * overriding `check_permission()`, so any read route added here later keeps the * ordinary admin capability. * * `activate_plugins` is not required: this route only writes the plugin to disk. * * @since 5.0.14 * * @return bool */ public function check_install_permission() { } /** * Install a plugin from WordPress.org. * * @since SUSPENDED * * @param WP_REST_Request $request Full details about the request. * * @return WP_REST_Response|WP_Error */ public function install_plugin($request) { } } /** * Admin Dashboard * * @since 2.8.0 * * @package dokan */ class AdminMiscController extends \WeDevs\Dokan\Abstracts\DokanRESTAdminController { /** * Route base. * * @var string */ protected $base = ''; /** * Register all routes releated with stores * * @return void */ public function register_routes() { } /** * Get help documents * * @return \WP_REST_Response */ public function get_help() { } /** * Get dokan option. * * @since 3.14.0 * * @param \WP_REST_Request $request * * @return \WP_REST_Response|\WP_Error */ public function get_option($request) { } } /** * Admin Notice Controller * * @since 3.3.3 * * @package dokan */ class AdminNoticeController extends \WeDevs\Dokan\Abstracts\DokanRESTAdminController { /** * Route base. * * @var string */ protected $base = 'notices'; /** * Register all routes related with dokan admin notices * * @since 3.3.3 * * @return void */ public function register_routes() { } /** * Get dokan specific notices * @param WP_REST_Request $request * * @return WP_REST_Response */ public function dokan_get_admin_notices(\WP_REST_Request $request) { } /** * Get dokan promotional notices * * @return WP_REST_Response */ public function get_promo_notices() { } } /** * Admin Onboarding REST Controller * * @since 4.0.0 */ class AdminOnboardingController extends \WeDevs\Dokan\REST\DokanBaseAdminController { /** * API base * * @var string */ protected $rest_base = 'onboarding'; /** * Register routes * * @since 4.0.0 * * @return void */ public function register_routes() { } /** * Get the schema for the endpoint * * @since 4.0.0 * * @return array */ public function get_item_schema(): array { } /** * Create onboarding data * * @since 4.0.0 * * @param WP_REST_Request $request * * @return WP_REST_Response|WP_Error */ public function create_onboarding(\WP_REST_Request $request) { } /** * Get onboarding data * * @since 4.0.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_onboarding(\WP_REST_Request $request): \WP_REST_Response { } /** * Update share essentials option * * @since 4.0.0 * * @param bool $share_essentials * * @return void */ protected function update_share_essentials(bool $share_essentials): void { } /** * Update marketplace goal settings * * @since 4.0.0 * * @param array $data Request data * * @return void */ protected function update_marketplace_goal(array $data): void { } /** * Install required plugins * * @since 4.0.0 * * @param array $plugins * * @return void */ protected function install_required_plugins(array $plugins): void { } } /** * Admin Dashboard * * @since 2.8.0 * * @package dokan */ class AdminReportController extends \WeDevs\Dokan\Abstracts\DokanRESTAdminController { /** * Route base. * * @var string */ protected $base = 'report'; /** * Register all routes releated with stores * * @return void */ public function register_routes() { } /** * Get at a glance * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function get_summary($request) { } /** * Get overview data * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function get_overview($request) { } } class AdminSetupGuideController extends \WeDevs\Dokan\REST\DokanBaseAdminController { /** * The namespace of this controller's route. * * @var string $rest_base The base URL for the REST API. */ protected $rest_base = 'setup-guide'; /** * Register all routes releated with stores. * * @since 4.0.0 * * @return void */ public function register_routes() { } /** * Get all items. * * @since 4.0.0 * * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function get_items($request): \WP_REST_Response { } /** * Get a single item. * * @since 4.0.0 * * @param WP_REST_Request $request Request object. * * @return \WP_Error| WP_REST_Response */ public function get_item($request) { } /** * Update a single item. * * @since 4.0.0 * * @param WP_REST_Request $request Request object. * * @return \WP_Error| WP_REST_Response */ public function update_item($request) { } /** * Set items as completed. * * @since 4.0.0 * * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function set_items_as_completed($request): \WP_REST_Response { } /** * Parse settings for storage. * * @param array $settings_data Settings data for parsing. * * @return array */ private function parse_settings_data(array $settings_data): array { } } /** * Dokan Changelog handler class * * @since 3.3.3 */ class ChangeLogController extends \WeDevs\Dokan\Abstracts\DokanRESTAdminController { /** * Route base. * * @var string */ protected $base = 'changelog'; /** * Register all routes related with stores * * @since 3.3.3 * * @return void */ public function register_routes() { } /** * Get Change Logs * * @since 3.3.3 * * @return WP_REST_Response|WP_Error */ public function get_change_log() { } } class CommissionControllerV1 extends \WeDevs\Dokan\Abstracts\DokanRESTController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'commission'; /** * Registering the commission routes here. * * @since 3.14.0 */ public function register_routes() { } /** * Checking if have any permission. * * @since 3.14.0 * * @return boolean */ public function get_permissions_check() { } /** * Returns commission or earning based on context. * * @param WP_REST_Request $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_commission($request) { } /** * Normalize the `category_ids` request param to a flat list of term IDs. * * The product editor's category field is an async-select that submits option * objects ([ { value, label }, ... ]); the commission lookup only needs the * integer term IDs, so reduce any object shape to its `value` before use. * * @since 5.0.6 * * @param mixed $value Raw `category_ids` value from the request. * * @return int[] */ public function sanitize_category_ids($value): array { } } class CustomersController extends \WC_REST_Customers_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Register the routes for customers. */ public function register_routes() { } /** * Check if a given request has access to perform an action. * * @param WP_REST_Request $request Full details about the request. * @param string $action The action to check (view, create, edit, delete). * * @return WP_Error|boolean */ protected function check_permission($request, $action) { } /** * Verify the requesting vendor may mutate the target user. * * Rejects targets that are missing, hold admin-grade capabilities, * are themselves a vendor, or have never placed an order with the * requesting vendor. CVE-2026-8761. * * @param int $target_id Target user id. * * @return true|WP_Error */ protected function is_target_user_allowed(int $target_id) { } /** * Check if the current user has vendor permissions. * * Doubles as a callback on the woocommerce_rest_check_permissions * filter so WooCommerce's internal capability checks for mutating * operations (create/edit/delete/batch) re-validate the target user. * Read context is allowed through for the vendor. * * @param bool|mixed $permission Original permission decision when used as a filter callback. * @param string $context Operation context (read/edit/delete/create/batch). * @param int $object_id Target object id. * @param string $object_type Object type (expected: user). * * @return bool */ public function check_vendor_permission($permission = false, $context = '', $object_id = 0, $object_type = ''): bool { } /** * Get all customers. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_items($request) { } /** * Get a single customer. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_item($request) { } /** * Create a customer. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function create_item($request) { } /** * Update a customer. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function update_item($request) { } /** * Delete a customer. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function delete_item($request) { } public function batch_items($request) { } /** * Search customers for the current vendor. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response * @throws \Exception */ public function search_customers($request) { } /** * Prepare a single customer for create or update. * * @param WP_REST_Request $request Request object. * @param bool $creating If is creating a new object. * * @return WP_Error|WC_Data */ protected function prepare_object_for_database($request, $creating = false) { } /** * Perform an action with vendor permission check. * * @param callable $action The action to perform. * * @return mixed The result of the action. */ private function perform_vendor_action(callable $action) { } /** * Check if a given request has access to get items. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_items_permissions_check($request) { } /** * Check if a given request has access to get a specific item. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_item_permissions_check($request) { } /** * Check if a given request has access to create a customer. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function create_item_permissions_check($request) { } /** * Check if a given request has access to update a customer. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function update_item_permissions_check($request) { } /** * Check if a given request has access to delete a customer. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function delete_item_permissions_check($request) { } /** * Check if a given request has access to batch items. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function batch_items_permissions_check($request) { } /** * Check if a given request has access to search customers. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function search_customers_permissions_check($request) { } } /** * Customer REST Controller for Dokan * * @since 3.14.11 * * @package dokan */ abstract class DokanBaseCustomerController extends \WeDevs\Dokan\REST\DokanBaseController { /** * Endpoint base. * * @var string */ protected $rest_base = 'customer'; /** * Check if user has customer permission. * * @since 3.14.11 * * @return bool */ public function check_permission() { } } class DokanDataContinentsController extends \WC_REST_Data_Continents_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = 'data/continents'; /** * Check the permission of the request for dokan. * * @since 4.0.0 * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function check_dokan_permission($request) { } /** * Check if a given request has access to read an item. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function get_item_permissions_check($request) { } /** * Check if a given request has access to read items. * * @since 4.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_items_permissions_check($request) { } } class DokanDataCountriesController extends \WC_REST_Data_Countries_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = 'data/countries'; /** * Check the permission of the request for dokan. * * @since 4.0.0 * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function check_dokan_permission($request) { } /** * Check if a given request has access to read an item. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|boolean */ public function get_item_permissions_check($request) { } /** * Check if a given request has access to read items. * * @since 4.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_items_permissions_check($request) { } } /** * Dokan Dummy Data Controller Class * * @since 3.6.2 * * @package dokan */ class DummyDataController extends \WeDevs\Dokan\Abstracts\DokanRESTController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'dummy-data'; /** * Register the routes for dummy data. */ public function register_routes() { } /** * Returns dokan import status. * * @since 3.6.2 * * @return WP_REST_Response|WP_Error */ public function import_dummy_data_status() { } /** * Imports dummy vendors and products. * * @param WP_REST_Request $request * * @since 3.6.2 * * @return WP_REST_Response|WP_Error */ public function import_dummy_data($request) { } /** * Clears dokan dummy data. * * @since 3.6.2 * * @return WP_REST_Response|WP_Error */ public function clear_dummy_data() { } /** * Checking if have any permission. * * @since 3.6.2 * * @return boolean */ public function get_permissions_check() { } /** * Get the dummy data's schema, conforming to JSON Schema. * * @since 3.6.2 * * @return array */ public function get_item_schema() { } } /** * Dokan Export Controller * * Extends WooCommerce's Export Controller to provide export functionality * for Dokan specific reports like withdraws. * * @since 4.1.3 */ class ExportController extends \Automattic\WooCommerce\Admin\API\Reports\Export\Controller { protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = '/reports/(?P[a-z]+)/export'; /** * Register routes. * * @since 4.1.3 */ public function register_routes() { } /** * Check if a given request has access to read items. * * @param \WP_REST_Request $request Full details about the request. * @return \WP_Error|boolean */ public function get_items_permissions_check($request) { } } /** * API_Registrar class */ class Manager { /** * Class dir and class name mapping * * @var array */ protected $class_map; /** * Constructor */ public function __construct() { } /** * Register REST API routes. * * @since 1.2.0 */ public function register_rest_routes() { } /** * Prepare object for product response * * @since 2.8.0 * * @return void */ public function prepare_product_response($response) { } /** * If store open close is truned off by admin, unset store_open_colse from api response * * @param array $data * * @since 2.9.13 * * @return array */ public function filter_store_open_close_option($data) { } /** * Send email to admin on adding a new product * * @param WC_Data $data * @param \WP_REST_Request $request * @param bool $creating * * @return void */ public function on_dokan_rest_insert_product($data, $request, $creating) { } /** * Make payment field hidden in api response for other vendor * * @param array $data * * @since 2.9.21 * * @return array */ public function filter_payment_response($data) { } /** * Register export controllers with WooCommerce export system * * @since 4.1.3 * * @param array $controller_map Existing controller map * * @return array Modified controller map */ public function register_export_controllers(array $controller_map): array { } /** * Register withdraw data endpoint for export * * @since 4.1.3 * * @param string $endpoint The report's data endpoint * @param string $type The report's type * * @return string The report's endpoint */ public function register_data_endpoint(string $endpoint, string $type): string { } /** * Generate Rest API class map * * @since 3.5.1 * * @return void */ private function get_rest_api_class_map() { } } /** * Dokan Order Controller Class * * @since 2.8.0 * * @package dokan */ class OrderController extends \WeDevs\Dokan\Abstracts\DokanRESTController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'orders'; /** * Post type * * @var string */ protected $post_type = 'shop_order'; /** * Post status */ protected $post_status = array(); /** * Stores the request. * @var array */ protected $request = array(); /** * Load autometically when class initiate * * @since 2.8.0 * * @return array */ public function __construct() { } /** * Register the routes for orders. */ public function register_routes() { } /** * Get object. * * @since 2.8.0 * * @param int $id Object ID. * * @return bool|WC_Order|WC_Order_Refund */ public function get_object($id) { } /** * Get Item for an object * * @since 3.9.2 * * @return object */ public function get_item($request) { } /** * Validation before update product * * @since 2.8.0 * * @return bool|WP_Error */ public function validation_before_update_item($request) { } /** * Get formatted item data. * * @since 3.0.0 * @param \WC_Data $object WC_Data instance. * @return array */ protected function get_formatted_item_data($object) { } /** * Prepare a single order output for response. * * @since 2.8.0 * * @param \WC_Data $object Object data. * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function prepare_data_for_response($object, $request) { } /** * Prepare data for udpate into database * * @since 2.8.0 * * @return WP_Error|WC_Order|WC_Order_Refund */ public function prepare_object_for_database($request) { } /** * Prepare links for the request. * * @param \WC_Data $object Object data. * @param WP_REST_Request $request Request object. * * @return array Links for the given post. */ protected function prepare_links($object, $request) { } /** * Get a collection of posts. * * @param WP_REST_Request $request Full details about the request. * * @return WP_REST_Response */ public function get_items($request) { } /** * Get order summary report * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function get_order_summary($request) { } /** * Expands an order item to get its data. * * @param \WC_Order_item $item * * @return array */ protected function get_order_item_data($item) { } /** * Get order notes from an order. * * @param WP_REST_Request $request * * @return array|WP_Error */ public function get_order_notes($request) { } /** * Create note for an Order * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function create_order_note($request) { } /** * Get a single order note. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response */ public function get_order_note($request) { } /** * Delete a single order note. * * @param WP_REST_Request $request Full details about the request. * * @return WP_REST_Response|WP_Error */ public function delete_order_note($request) { } /** * Prepare a single order note output for response. * * @param WP_Comment $note Order note object. * @param WP_REST_Request $request Request object. * @return WP_REST_Response $response Response data. */ public function prepare_note_item_for_response($note, $request) { } /** * Checking if have any permission to view orders * * @since 2.8.0 * * @return boolean */ public function get_orders_permissions_check() { } /** * Checking if have any permission to view orders * * @since 2.8.0 * * @return boolean */ public function get_single_order_permissions_check($request) { } /** * Updat order permission checking * * @since 2.8.0 * * @return bool */ public function update_order_permissions_check() { } /** * Checking if have any permission to view orders * * @since 2.8.0 * * @return boolean */ public function check_orders_summary_permissions() { } /** * Set vendor ID on order when creating from REST API * * @since 2.8.2 * * @param array $args * * @return array */ public function set_order_vendor_id($args) { } /** * Mark order as parent when it has products from multiple vendors * * @since 2.9.11 * * @param WC_Order $order * @param WP_REST_Request $request * @param bool $creating * * @return WC_Order */ public function pre_insert_shop_order($order, $request, $creating) { } /** * Insert into Dokan sync table once an order is created via API * * @since 2.8.2 [] * * @param WC_Order $object * @param WP_REST_Request $request * * @return void */ public function after_order_create($object, $request) { } /** * Get order statuses without prefixes. * * @return array */ protected function get_order_statuses() { } /** * Get the Order's schema, conforming to JSON Schema. * * @return array */ public function get_item_schema() { } /** * Validating the customer id to query orders. * * @since 3.9.5 * * @param string $param * @param WP_REST_Request $request * @param string $key * * @return boolean|WP_Error */ public function rest_validate_customer_id($param, $request, $key) { } /** * Retrieves the query params for the posts collection. * * @since 4.7.0 * * @return array Collection parameters. */ public function get_collection_params() { } } /** * Dokan Order ControllerV2 Class * * @since 3.7.10 * * @package dokan */ class OrderControllerV2 extends \WeDevs\Dokan\REST\OrderController { /** * Endpoint namespace * * @since 3.7.10 * * @var string */ protected $namespace = 'dokan/v2'; /** * Register the routes for orders. * * @since 3.7.10 * * @return void */ public function register_routes() { } /** * Get Order Downloads. * * @since 3.7.10 * * @param \WP_REST_Request $request Request object. * * @return WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function get_order_downloads($request) { } /** * Format downloads data. * * @since 4.0.0 * * @param \stdClass[] $downloads * @param \WC_Product[] $products * * @return array */ protected function format_downloads_data($downloads, $products) { } /** * Prepare data for response. * * @since 4.0.0 * * @param \stdClass $download * @param \WP_REST_Request $request * * @return \stdClass */ public function prepare_data_for_response($download, $request) { } /** * Grant downloadable product access to the given order. * * @since 3.7.10 * * @param \WP_REST_Request $requests Request object. * * @return WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function grant_order_downloads($requests) { } /** * Update a downloadable product permission for the given order. * * @since 4.3.1 * * @param \WP_REST_Request $request Request object. * * @return WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function update_order_download($request) { } /** * Revoke downloadable product access to the given order. * * @since 3.7.10 * * @param \WP_REST_Request $requests Request object. * * @return WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function revoke_order_downloads($requests) { } /** * Updates bulk orders status. * * @since 3.7.10 * * @param \WP_REST_Request $requests Request object. * * @return WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function process_orders_bulk_action($requests) { } /** * Sanitizes order ids. * * @since 3.7.10 * * @param array $order_ids * * @return array */ public function sanitize_order_ids($order_ids) { } } /** * Dokan Order ControllerV3 Class * * @since 4.0.0 * * @package dokan */ class OrderControllerV3 extends \WeDevs\Dokan\REST\OrderControllerV2 { /** * Endpoint namespace * * @since 4.0.0 * * @var string */ protected $namespace = 'dokan/v3'; /** * @param $downloads * @param \WC_Product[] $products * * @return array */ protected function format_downloads_data($downloads, $products) { } } class ProductAttributeController extends \WC_REST_Product_Attributes_V1_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = 'products/attributes'; /** * Attribute name. * * @var string */ protected $attribute = ''; /** * Register the routes for product attributes. */ public function register_routes() { } /** * Check if a given request has access to read the attributes. * * @param WP_REST_Request $request Full details about the request. * * @return bool */ public function get_items_permissions_check($request) { } /** * Check if a given request has access to create a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return bool */ public function create_item_permissions_check($request) { } /** * Check if a given request has access to read a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|bool */ public function get_item_permissions_check($request) { } /** * Check if a given request has access to update a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|bool */ public function update_item_permissions_check($request) { } /** * Check if a given request has access to update a product attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|bool */ public function update_product_attribute_permissions_check($request) { } /** * Check if a given request has access to create a new attribute term. * * Creating terms is only allowed when vendors are permitted to add new * attributes from the selling options. * * @since 5.0.5 * * @param WP_REST_Request $request Full details about the request. * * @return bool|WP_Error */ public function create_attribute_term_permissions_check($request) { } /** * Check if a given request has access to delete a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|bool */ public function delete_item_permissions_check($request) { } /** * Check if a given request has access batch create, update and delete items. * * @param WP_REST_Request $request Full details about the request. * * @return bool|WP_Error */ public function batch_items_permissions_check($request) { } /** * Get product attribute and term update collection params. * * @since 3.7.10 * * @return array */ public function get_product_update_collection_params() { } /** * Update product attributes by a product id. * * @since 3.7.10 * * @param WP_Rest_Request $request * @return WP_Error|WP_REST_Response Rest Response */ public function update_product_attribute($request) { } /** * Update product default attributes by a product id. * * @since 3.7.10 * * @param WP_Rest_Request $request * * @return WP_Error|WP_REST_Response Rest Response */ public function update_product_default_attribute($request) { } /** * Resolve a global attribute taxonomy from its attribute ID. * * @since 5.0.5 * * @param int $attribute_id Global attribute ID. * * @return string|WP_Error Taxonomy name, or error if the attribute is invalid. */ protected function get_attribute_taxonomy_by_id($attribute_id) { } /** * Format a term for the product editor response. * * @since 5.0.5 * * @param \WP_Term $term Term object. * * @return array */ protected function prepare_attribute_term($term) { } /** * Get terms of a global product attribute (searchable + paginated). * * Terms are loaded lazily by the product editor instead of being embedded * into the form schema, so stores with very large attribute taxonomies do * not exhaust memory while building the editor payload. * * @since 5.0.5 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response */ public function get_attribute_terms($request) { } /** * Create a new term for a global product attribute. * * @since 5.0.5 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response */ public function create_attribute_term($request) { } } class ProductAttributeTermsController extends \WC_REST_Product_Attribute_Terms_V1_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Check if a given request has access to read the attributes. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_items_permissions_check($request) { } /** * Check if a given request has access to create a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function create_item_permissions_check($request) { } /** * Check if a given request has access to read a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function get_item_permissions_check($request) { } /** * Check if a given request has access to update a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function update_item_permissions_check($request) { } /** * Check if a given request has access to delete a attribute. * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|boolean */ public function delete_item_permissions_check($request) { } /** * Delete a single term from a taxonomy. * * @param WP_REST_Request $request Full details about the request. * * @return WP_REST_Response|WP_Error */ public function delete_item($request) { } } /** * Store API Controller * * phpcs:disable WordPress.WP.Capabilities.Unknown * * @package dokan * * @author weDevs */ class ProductController extends \WeDevs\Dokan\Abstracts\DokanRESTController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'products'; /** * Post type * * @var string */ protected $post_type = 'product'; /** * Post status */ protected $post_status = ['publish', 'pending', 'draft', 'future']; /** * Class constructor. * * @since 4.0.0 */ public function __construct() { } /** * Hooks into WooCommerce's woocommerce_rest_prepare_product_object filter intentionally * so that min_price and max_price are available on both /wc/v3/products and Dokan endpoints. * * @since 4.3.1 * * @param WP_REST_Response $response The response object. * @param WC_Product $product The product object. * * @return WP_REST_Response */ public function add_min_max_price_to_variable_product(\WP_REST_Response $response, $product): \WP_REST_Response { } /** * Add only downloadable meta query. * * @since 4.0.0 * * @param array $args * * @param \WP_REST_Request $request */ public function add_only_downloadable_query($args, $request) { } /** * Product API query parameters collections. * * @since 4.0.0 * * @return array Query parameters. */ public function get_product_collection_params() { } /** * Register all routes related with stores * * @return void */ public function register_routes() { } /** * Get product object * * @since 2.8.0 * * @return WC_Product|null|false */ public function get_object($id) { } /** * Validation_before_create_product * * @param $request * * @since 1.0.0 * * @return bool|WP_Error */ public function validation_before_create_item($request) { } /** * Validation before update product * * @param $request * * @since 2.8.0 * * @return bool|WP_Error */ public function validation_before_update_item($request) { } /** * Validation_before_delete_item * * @since 2.8.0 * * @return WP_Error|Boolean */ public function validation_before_delete_item($request) { } /** * Get product permissions check * * @since 2.8.0 * * @return bool */ public function get_product_permissions_check() { } /** * Create_product_permissions_check * * @since 2.8.0 * * @return bool */ public function create_product_permissions_check() { } /** * Get_single_product_permissions_check * * @since 2.8.0 * @since 5.0.5 Added check for dokan_is_product_author() * * @return bool */ public function get_single_product_permissions_check($request) { } /** * Update_product_permissions_check * * @since 2.8.0 * * @return bool */ public function update_product_permissions_check() { } /** * Delete product permission checking * * @since 2.8.0 * * @return bool */ public function delete_product_permissions_check() { } /** * Get product summary report * * @since 2.8.0 * * @return bool */ public function get_product_summary_permissions_check() { } /** * Get product summary report in dashboard * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function get_product_summary($request) { } /** * Get the product types excluded from the vendor product listing. * * The vendor product list sends its own `exclude_types` set — omitting the * types it wants shown (e.g. it drops `auction` to reveal auctions). Every * other request (the manual order product picker, the legacy page) sends * nothing and falls back to the default `[ 'auction', 'booking' ]`, so those * keep excluding them. * * @since 5.0.10 * * @param WP_REST_Request $request Request object. * * @return array */ protected function get_exclude_types($request) { } /** * Collection param schema for `exclude_types`. * * Product type slugs to hide from the vendor listing. Consumed by * get_exclude_types(); the vendor product list sends it (omitting the types * it wants shown, e.g. `auction`). * * @since 5.0.10 * * @return array */ protected function get_exclude_types_param() { } /** * Get month options for the current vendor. * * @since 5.0.0 * * @param int $seller_id * * @return array */ public function get_product_months_data($seller_id) { } /** * Get related product * * @since 2.9.1 * * @param WP_REST_Request $request * * @return WP_REST_Response|WP_Error */ public function get_related_product($request) { } /** * Top rated product * * @since 2.9.1 * * @return array|object|WP_Error|WP_REST_Response */ public function get_top_rated_product($request) { } /** * Best selling product * * @since 2.9.1 * * @return WP_REST_Response|array|WP_Error */ public function get_best_selling_product($request) { } /** * Featured product * * @since 2.9.1 * * @return WP_REST_Response|array|WP_Error */ public function get_featured_product($request) { } /** * Latest product * * @since 2.9.1 * * @return WP_REST_Response|array|WP_Error */ public function get_latest_product($request) { } /** * Validate post author overrides. * * @since 3.10.3 * * @param WP_REST_Request $request Request object. * @param int $store_id fallback Store or author id. * * @return int */ public function validate_post_author_override(\WP_REST_Request $request, int $store_id): int { } /** * Prepare objects query * * @param WP_REST_Request|array $request * * @return array */ protected function prepare_objects_query($request) { } /** * Get product data. * * @param WC_Product $product Product instance. * @param WP_REST_Request $request Request context. * Options: 'view' and 'edit'. * * @return WP_REST_Response|array|WP_Error */ protected function prepare_data_for_response($product, $request) { } /** * Prepare object for database mapping * * @param WP_REST_Request $request * @param boolean $creating * * @return object * @throws WC_REST_Exception * @throws \WC_Data_Exception */ protected function prepare_object_for_database($request, $creating = false) { } /** * Prepare links for the request. * * @param WC_Data $data_object Object data. * @param WP_REST_Request $request Request object. * * @return array Links for the given post. */ protected function prepare_links($data_object, $request) { } /** * Get taxonomy terms. * * @param WC_Product $product Product instance. * @param string $taxonomy Taxonomy slug. * * @return array */ protected function get_taxonomy_terms($product, $taxonomy = 'cat') { } /** * Get the images for a product or product variation. * * @param WC_Product|WC_Product_Variation $product Product instance. * * @return array */ protected function get_images($product) { } /** * Get attribute taxonomy label. * * @param string $name Taxonomy name. * * @return string * @deprecated 2.8.0 */ protected function get_attribute_taxonomy_label($name) { } /** * Get product attribute taxonomy name. * * @param string $slug Taxonomy name. * @param WC_Product $product Product data. * * @since 2.8.0 * @return string */ protected function get_attribute_taxonomy_name($slug, $product) { } /** * Get default attributes. * * @param WC_Product $product Product instance. * * @return array */ protected function get_default_attributes($product) { } /** * Get attribute options. * * @param int $product_id Product ID. * @param array $attribute Attribute data. * * @return array */ protected function get_attribute_options($product_id, $attribute) { } /** * Get the attributes for a product or product variation. * * @param WC_Product|WC_Product_Variation $product Product instance. * * @return array */ protected function get_attributes($product) { } /** * Get the downloads for a product or product variation. * * @param WC_Product|WC_Product_Variation $product Product instance. * * @return array */ protected function get_downloads($product) { } /** * Set product images. * * @param WC_Product $product Product instance. * @param array $images Images data. * * @return WC_Product * @throws WC_REST_Exception REST API exceptions. */ protected function set_product_images($product, $images) { } /** * Save product shipping data. * * @param WC_Product $product Product instance. * @param array $data Shipping data. * * @return WC_Product */ protected function save_product_shipping_data($product, $data) { } /** * Save downloadable files. * * @param WC_Product $product Product instance. * @param array $downloads Downloads data. * @param int $deprecated Deprecated since 3.0. * * @return WC_Product */ protected function save_downloadable_files($product, $downloads, $deprecated = 0) { } /** * Save taxonomy terms. * * @param WC_Product $product Product instance. * @param array $terms Terms data. * @param string $taxonomy Taxonomy name. * * @return WC_Product */ protected function save_taxonomy_terms($product, $terms, $taxonomy = 'cat') { } /** * Save default attributes. * * @param WC_Product $product Product instance. * @param WP_REST_Request $request Request data. * * @since 3.0.0 * * @return WC_Product */ protected function save_default_attributes($product, $request) { } /** * Returns all categories. * * @since 3.6.2 * * @return WP_REST_Response|WP_Error */ public function get_multistep_categories() { } /** * Get the Product's schema, conforming to JSON Schema. * * @return array */ public function get_item_schema() { } } /** * Product Block API. * * @package dokan * * @author weDevs */ class ProductBlockController extends \WeDevs\Dokan\REST\ProductController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'blocks/products'; /** * Register all routes related with stores. * * @return void */ public function register_routes() { } /** * Get Product detail item for block. * * @since 3.7.10 * * @param \WP_Request $request * @return void */ public function get_item($request) { } } /** * Products API Controller V2 * * @package dokan * * @author weDevs */ class ProductControllerV2 extends \WeDevs\Dokan\REST\ProductController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v2'; /** * Class Constructor. * * @since 4.1.3 * * @return void */ public function __construct() { } /** * Register all routes related with stores * * @since 3.7.10 * * @return void */ public function register_routes() { } /** * Saves product. * * @since 3.7.16 * * @param WP_REST_Request $request * * @return void */ public function create_item($request) { } /** * Updates product. * * @since 3.7.16 * * @param WP_REST_Request $request * * @return void */ public function update_item($request) { } /** * Save chosen category to database. * * @param WP_Error|WP_REST_Response $response * * @return void */ private function set_chosen_categories($response) { } /** * Product API query parameters collections. * * @since 3.7.10 * * @return array Query parameters. */ public function get_collection_params() { } /** * Returns data by which products can be filtered. * * @since 3.7.10 * * @return array */ public function get_product_filter_by_data() { } /** * Preparing query parameters array to fetch products from database. * * @param WP_REST_Request $request * * @return array */ protected function prepare_objects_query($request) { } /** * Returns filter data items schema. * * @since DOKAN_LITE * * @return array array of the schema. */ public function get_filter_data_schema() { } /** * Reset exclude product type. * * @since 4.1.3 * * @param array $exclude_product_type Exclude product type. * @param WP_REST_Request $request Request object. * * @return array */ public function reset_exclude_product_type($exclude_product_type, $request) { } } class ProductControllerV3 extends \WC_REST_Products_Controller { use \WeDevs\Dokan\Traits\VendorAuthorizable; /** * Endpoint namespace * * @since 5.0.0 * * @var string */ protected $namespace = 'dokan/v3'; /** * Whether the rest_pre_dispatch filter has already been registered. * * @since 5.0.0 * * @var bool */ private static $filter_registered = false; /** * Check if the current user can create a product. * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return true|WP_Error */ public function create_item_permissions_check($request) { } /** * Check if the current user can view/update the given product. * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return true|WP_Error */ public function check_permission($request) { } /** * Whether the current user owns the product targeted by the request. * * Centralizes the per-product authorship gate shared by the update and delete * permission checks. A request without an `id` has no product to own, so it * passes here and the capability check stays the gate. * * @since 5.0.7 * * @param WP_REST_Request $request Full details about the request. * * @return bool */ protected function check_ownership($request): bool { } /** * Check if the current user has permission for batch operations. * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return true|WP_Error */ public function batch_items_permissions_check($request) { } /** * Check ownership before a batched product update. * * WooCommerce's WC_REST_Controller::batch_items() calls this once per "update" * item, so this — not the route-level batch_items_permissions_check() — is where * a vendor is stopped from editing another vendor's product. * * @since 5.0.7 * * @param WP_REST_Request $request Full details about the request. * * @return true|WP_Error */ public function update_item_permissions_check($request) { } /** * Check ownership before a batched product delete. * * Mirrors update_item_permissions_check(); the batch route is the only delete * path the v3 controller exposes, so the ownership gate must live here. * * @since 5.0.7 * * @param WP_REST_Request $request Full details about the request. * * @return true|WP_Error */ public function delete_item_permissions_check($request) { } /** * Bulk create, update and delete items. * * Resolves each item's payload through PayloadResolver before delegating * to the parent WC_REST_Controller::batch_items(). * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return array|WP_Error */ public function batch_items($request) { } /** * Register the routes for products. * * @since 5.0.0 * * @return void */ public function register_routes() { } /** * Create a product item. * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response */ public function create_item($request) { } /** * Update a product item. * * @since 5.0.0 * * @param WP_REST_Request $request Full details about the request. * * @return WP_Error|WP_REST_Response */ public function update_item($request) { } /** * Prepare a single product for create or update. * * Every save funnels through here - WooCommerce routes create, update and batch alike through * save_object() - so form-level validation runs once here instead of per endpoint, and it judges * the product WooCommerce assembled rather than the raw payload. The product itself is not written * until save_object() calls save() on what this returns, though the parent call can already have * created attachment records when a payload sends images by URL; the vendor form only ever sends * attachment ids. * * @since 5.0.16 * * @param WP_REST_Request $request Full details about the request. * @param bool $creating Whether a new product is being created. * * @return WC_Data|WP_Error */ protected function prepare_object_for_database($request, $creating = false) { } /** * Restore the vendor's featured/gallery split after WooCommerce has consumed `images`. * * WooCommerce takes the featured image from array index 0, and its v3 images schema has no * `position` at all, so a product saved with gallery images but no featured image loses its * first gallery image to the featured slot — with a single gallery image the gallery ends up * empty. PayloadResolver::resolve_images() tags every entry with the position the vendor * actually chose, so the split is reapplied here. * * Payloads this plugin did not resolve carry no positions and are left to WooCommerce. * * @since 5.0.19 * * @param WC_Data|WC_Product $product Product assembled from the request, not yet saved. * @param WP_REST_Request $request Full details about the request. * * @return WC_Data|WC_Product */ protected function apply_image_positions($product, $request) { } /** * Reject a downloadable product saved without a file while the form marks "Downloadable Files" as required. * * The required flag lives in the form schema, where Dokan Pro's Product Form Manager writes it, so it is * read back from the schema rather than hard-coded. Browser-side validation alone can be bypassed, which * is how incomplete downloadable products reach the review queue. * * Judged on the assembled product rather than on the payload, because the payload can be shaped to dodge * the rule: WooCommerce turns a product downloadable from `downloadable` alone and only reads `downloads` * when that key is sent, and it drops file-less rows in save_downloadable_files(). A save that leaves * both fields alone, such as quick edit, stays out of scope. * * Deliberately scoped to this one field: the schema marks several fields required that a partial form * never renders yet still submits empty - the quick-create modal omits the required Description - so * enforcing every required field here would reject those saves outright. Extensions that need their own * rules can hook `dokan_rest_pre_insert_product_object`. * * Product variations are out of reach here: WooCommerce saves them through WC_REST_Product_Variations_Controller, * which never enters this controller, so a downloadable variation is guarded in the browser only. * * @since 5.0.16 * * @param WP_REST_Request $request Full details about the request. * @param WC_Data $product Product assembled from the request, not yet saved. * * @return WP_Error|null Error when the required file is missing, null otherwise. */ protected function validate_required_downloads($request, $product) { } /** * Replace WooCommerce's admin-oriented "approved download directory" rejection with vendor-friendly guidance. * * WooCommerce raises product_invalid_download whenever a downloadable file can't be used — most often because * its folder isn't an approved download directory — and tells the user to "contact a site administrator," * which a vendor can't act on. The specific cause isn't exposed (the error code and data are generic) and * WooCommerce has already run the directory check, so rather than re-deriving it we simply restate the * message; the field's tooltip explains the approved-directory requirement up front. * * @since 5.0.6 * * @param WP_Error $error Error returned from the parent WooCommerce REST save. * * @return WP_Error */ protected function clarify_download_error(\WP_Error $error): \WP_Error { } /** * Populate $_POST with resolved request params so legacy hooks * (e.g. dokan_new_product_added, dokan_product_updated consumers) * that read from $_POST continue to work. * * @since 5.0.0 * * @param array $params Resolved request parameters. * * @return void */ private function populate_post_data(array $params): void { } /** * Resolve product request body before schema validation runs (so WC schema sees WC-shaped payload). * Runs on rest_pre_dispatch so that schema_to_wc_api is applied before args validation. * * @param mixed $result Response to replace the short-circuit result with. * @param WP_REST_Server $server Server instance. * @param WP_REST_Request $request Request used to generate the response. * * @return mixed Unchanged result so dispatch continues; request body is modified in place. */ public function resolve_product_payload_before_validation($result, $server, $request) { } public function init_form_fields($request) { } /** * Get item fields for form manager * * @param WP_REST_Request $request Request data. * * @since 5.0.0 * * @return WP_REST_Response|WP_Error */ public function get_form_fields($request) { } } /** * Class Controller * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal\REST */ class ReverseWithdrawalController extends \WP_REST_Controller { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $rest_base = 'reverse-withdrawal'; /** * Register all routes related with reverse withdrawal * * @since 3.5.1 * * @return void */ public function register_routes() { } /** * Checks if a given request has access to get items. * * @since 3.5.1 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function get_stores_balance_permissions_check($request) { } /** * This method will return transactions group by each stores * * @since 3.5.1 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_stores_balance($request) { } /** * Checks if a given request has access to get items. * * @since 3.5.1 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function get_store_transactions_permissions_check($request) { } /** * Checks if a given request has access to create items. * * @since 3.7.24 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function create_transactions_permissions_check($request) { } /** * This method will return transactions of a single store * * @since 3.5.1 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_store_transactions($request) { } /** * Checks if a given request has access to get items. * * @since 3.7.16 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function get_vendor_due_status_permissions_check($request) { } /** * Checks if a given request can put a reverse withdrawal payment into the cart. * * @since 5.0.14 * * @param WP_REST_Request $request Full details about the request. * * @return bool|WP_Error */ public function add_to_cart_permissions_check($request) { } /** * This method will return due status of a single vendor * * @since 3.7.16 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_vendor_due_status($request) { } /** * Checks if a given request has access to get items. * * @since 3.5.1 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function get_stores_permissions_check($request) { } /** * This method will return unique stores under reverse withdrawal table * * @since 3.5.1 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_stores($request) { } /** * This method will add reverse payment amount to cart * * @since 3.7.16 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function add_to_cart($request) { } /** * Checks if a given request has access to get items. * * @since 3.5.1 * * @param WP_REST_Request $request Full details about the request. * * @return bool True if the request has read access, false otherwise. */ public function get_transaction_types_permissions_check($request) { } /** * This method will return transaction types * * @since 3.5.1 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_transaction_types($request) { } /** * Create manual reverse withdrawal transaction * * @since 3.7.24 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function create_transaction($request) { } /** * Prepare refund for response * * @since 3.5.1 * * @param array $item * @param WP_REST_Request $request * * @return WP_REST_Response */ public function prepare_balance_for_response($item, $request) { } /** * Prepare refund for response * * @since 3.7.16 * * @param array $item * @param WP_REST_Request $request * * @return WP_REST_Response */ public function prepare_vendor_due_status_for_response($item, $request) { } /** * Prepare transaction for response * * @since 3.5.1 * * @param array $item * @param WP_REST_Request $request * @param float $current_balance * * @return WP_REST_Response */ public function prepare_transaction_for_response($item, $request, &$current_balance) { } /** * Prepare links for the request. * * @since 3.5.1 * * @param array $item * @param WP_REST_Request $request Request object. * * @return array Links for the given item. */ protected function prepare_links($item, $request) { } /** * Format item's collection for response * * @since 3.5.1 * * @param WP_REST_Response|WP_Error $response * @param WP_REST_Request $request * @param int $total_items * * @return WP_REST_Response|WP_Error */ public function format_collection_response($response, $request, $total_items) { } /** * Retrieves the query params for the collections. * * @since 3.5.1 * * @return array Query parameters for the collection. */ public function get_stores_balance_route_params() { } /** * Retrieves the query params for the collections. * * @since 3.5.1 * * @return array Query parameters for the collection. */ public function get_store_transactions_route_params() { } /** * Get the Cart schema, conforming to JSON Schema. * * @since 3.5.1 * * @return array */ public function get_public_item_schema_for_store_balance() { } /** * Get the Cart schema, conforming to JSON Schema. * * @since 3.5.1 * * @return array */ public function get_item_schema() { } /** * Get the Cart schema, conforming to JSON Schema. * * @since 3.5.1 * * @return array */ public function get_public_item_schema_for_transaction_types() { } /** * Get the Cart schema, conforming to JSON Schema. * * @since 3.5.1 * * @return array */ public function get_public_schema_for_stores() { } /** * Get the Cart schema, conforming to JSON Schema. * * @since 3.7.16 * * @return array */ public function get_public_schema_for_vendor_balance() { } } /** * Store API Controller * * @package dokan * * @author weDevs */ class StoreController extends \WP_REST_Controller { use \WeDevs\Dokan\Traits\VendorAuthorizable; /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'stores'; /** * Register all routes releated with stores * * @return void */ public function register_routes() { } /** * Get stores * * @since 1.0.0 * * @param $request * * @return object|WP_Error|WP_REST_Response */ public function get_stores($request) { } /** * Get singe store * * Public endpoint: Returns public data for all users/guests (respecting admin settings). * Sensitive data is only returned for authorized users (vendor, vendor staff, or admin). * * For vendor staff accessing via their own ID, the vendor ID is resolved to show their vendor's store. * Vendors and vendor staff attempting to access another vendor's store will be blocked (403). * * @since 1.0.0 * * @param $request * * @return WP_Error|WP_REST_Response */ public function get_store($request) { } /** * Delete store * * @since 2.8.0 * * @param $request * * @return WP_Error|WP_REST_Response */ public function delete_store($request) { } /** * Update store permission check method * * @param $request * * @since 2.9.2 * * @return bool */ public function update_store_permissions_check($request) { } /** * Update Store * * @since 2.9.2 * * @param WP_REST_Request $request * * @return WP_Error|WP_REST_Response */ public function update_store($request) { } /** * Get restricted fields for store update based on user role. * * @since 4.2.5 * * @param \WeDevs\Dokan\Vendor\Vendor $store Store object. * @param \WP_REST_Request $request Request object. * * @return array Array of restricted field names. */ protected function get_restricted_fields_for_update($store, $request) { } /** * Create store * * @param $request * * @return WP_Error|WP_REST_Response */ public function create_store($request) { } /** * Undocumented function * * @since 1.0.0 * * @return bool */ public function permission_check_for_manageable_part() { } /** * Prepare links for the request. * * @param \WC_Data $data Object data. * @param WP_REST_Request $request Request object. * * @return array Links for the given post. */ protected function prepare_links($data, $request) { } /** * Format item's collection for response * * @param object $response * @param object $request * @param int $total_items * * @return object */ public function format_collection_response($response, $request, $total_items) { } /** * Get store Products * * @param WP_REST_Request|array $request * * @return WP_Error|WP_REST_Response */ public function get_store_products($request) { } /** * Get store reviews * * @since 2.8.0 * * @return object|WP_Error|WP_REST_Response */ public function get_store_reviews($request) { } /** * Get total counting for store review * * @param integer $id [hold store id] * @param string $post_type * @param string $status * * @since 2.8.0 * * @return integer */ public function get_total_review_count($id, $post_type, $status) { } /** * Prepare a single user output for response * * Public data is returned for all users/guests (respecting admin settings for hiding vendor info). * Sensitive data is only returned for authorized users (vendor, vendor staff, or admin). * * @param Vendor $store * @param WP_REST_Request $request Request object. * @param array $additional_fields (optional) * @param bool $is_authorized (optional) Whether the current user is authorized to view sensitive data. * * @return WP_REST_Response $response Response data. */ public function prepare_item_for_response($store, $request, $additional_fields = []) { } /** * Get restricted fields for store view based on user authorization. * * Determines which fields should be hidden from the store data response based on: * - User authorization status (authorized users see more data) * - User role (vendor staff cannot see admin commission data) * - Admin settings (for hiding vendor info like address, phone, email) * - Vendor preferences (vendor can choose to hide email) * * @since 4.2.5 * * @param \WeDevs\Dokan\Vendor\Vendor $store Store object. * @param \WP_REST_Request $request Request object. * * @return array Array of restricted field names that should be removed from the response. */ protected function get_restricted_fields_for_view($store, $request) { } /** * Whether the current user's role may see admin-configured commission settings at all. * * Callers must additionally confirm the user is authorized for the store in question, * since this only answers the role question — vendor staff are excluded deliberately. * * @since 5.0.14 * * @return bool */ protected function can_view_commission_settings(): bool { } /** * Prepare a single user output for response * * @param object $item * @param WP_REST_Request $request Request object. * @param array $additional_fields (optional) * * @return array $response Response data. */ public function prepare_reviews_for_response($item, $request, $additional_fields = []) { } /** * Check store availability * * @param WP_REST_Request $request * * @since 2.9.13 * * @return WP_REST_Response */ public function check_store_availability($request) { } /** * Send email to vendor * * @param WP_REST_Request * * @since 2.9.23 * * @return WP_REST_Response */ public function send_email($request) { } /** * Update vendor status * * @since 2.9.23 * * @return WP_REST_Response|WP_Error */ public function update_vendor_status($request) { } /** * Batch update for vendor listing * * @param $request * * @since 2.9.23 * * @return array|WP_Error */ public function batch_update($request) { } /** * Get singe store * * @since 3.2.11 * * @param $request * * @return WP_Error|WP_REST_Response */ public function get_store_category($request) { } /** * Retrieves the query params for the collections. * * @since 3.7.22 * * @return array Query parameters for the collection. */ public function get_store_collection_params(): array { } /** * Updated query params for the store. * * @since 3.14.10 * * @return array Query parameters for the store update. */ public function get_store_update_params(): array { } } /** * StoreSettings API Controller * @package dokan * * @author weDevs */ class StoreSettingController extends \WeDevs\Dokan\REST\StoreController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $rest_base = 'settings'; /** * Register all routes related to settings * * @return void */ public function register_routes() { } /** * Update Store * * @param \WP_REST_Request $request * * @since 3.2.12 * * @return WP_Error|\WP_REST_Response */ public function update_settings($request) { } /** * @param \WP_REST_Request $request * * @return mixed|WP_Error|\WP_HTTP_Response|\WP_REST_Response */ public function get_settings($request) { } /** * Permission callback for vendor settings * * @return bool|WP_Error */ public function get_settings_permission_callback() { } /** * Get vendor * * @param \WP_REST_Request|null * * @return WP_Error|Vendor */ protected function get_vendor($request = null) { } /** * Prepare links for the request. * * @param \WC_Data $object Object data. * @param \WP_REST_Request $request Request object. * * @return array Links for the given post. */ protected function prepare_links($object, $request) { } /** * Prepare a single item output for response * * @param $store * @param \WP_REST_Request $request Request object. * @param array $additional_fields (optional) * * @return \WP_REST_Response $response Response data. */ public function prepare_item_for_response($store, $request, $additional_fields = []) { } } /** * StoreSettings API Controller * * @package dokan * * @author weDevs */ class StoreSettingControllerV2 extends \WeDevs\Dokan\REST\StoreSettingController { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v2'; /** * Register all routes related to settings * * @return void */ public function register_routes() { } /** * Update Settings Group or Page. * * @since 3.7.10 * * @param WP_REST_Request $request The request object. * * @return WP_Error|WP_REST_Response */ public function update_settings($request) { } /** * Update Store single settings. * * @since 3.7.10 * * @param WP_REST_Request $request * * @return WP_Error|WP_REST_Response */ public function update_single_settings($request) { } /** * Update Store single settings field. * * @since 3.7.10 * * @param WP_REST_Request $request * * @return WP_Error|WP_REST_Response */ public function update_single_settings_field($request) { } /** * @param $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_settings_list($request) { } /** * @param $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_settings_group($request) { } /** * @param $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_single_settings($request) { } /** * @param $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_single_settings_field($request) { } /** * Args for updating a single setting. * * @return array */ private function update_single_settings_args() { } /** * Args for updating setting group. * * @return array */ private function update_settings_group_args() { } } /** * Tools REST controller for the free admin Tools page. * * Pro keeps its own paths under the same `tools` base for its Pro-only actions. * * @since 5.0.9 */ class ToolsController extends \WeDevs\Dokan\REST\DokanBaseAdminController { /** * Route base. * * @var string */ protected $rest_base = 'tools'; /** * Tools actions service. * * @var ToolsActions */ private $tools; /** * Constructor. * * @since 5.0.9 */ public function __construct() { } /** * Register routes. * * @since 5.0.9 * * @return void */ public function register_routes() { } /** * Create the Dokan default pages. * * @since 5.0.9 * * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function create_pages(\WP_REST_Request $request) { } /** * Check whether all Dokan pages exist. * * @since 5.0.9 * * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function check_all_dokan_pages_exists(\WP_REST_Request $request) { } /** * Clear all Dokan caches. * * @since 5.0.9 * * @param WP_REST_Request $request Request object. * * @return WP_REST_Response */ public function clear_caches(\WP_REST_Request $request) { } } class VendorDashboardController extends \WP_REST_Controller { /** * Endpoint namespace * * @var string */ protected $namespace = 'dokan/v1'; /** * Route name * * @var string */ protected $base = 'vendor-dashboard'; /** * Vendor dashboard controller constructor. * * @since 3.3.3 * * @return void */ public function register_routes() { } /** * Get dashboard statistics. * * @since 3.3.3 * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_dashboard_statistics() { } /** * Get Vendor profile Information. * * @since 3.3.3 * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_profile_information() { } /** * Get Vendor Sales Report. * * @since 3.3.3 * * @param WP_REST_Request $request * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_sales_reports($request) { } /** * Get Vendor products reports summary. * * @since 3.3.3 * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_products_summary() { } /** * Get Vendor Order reports summary. * * @since 3.3.3 * * @return WP_Error|WP_HTTP_Response|WP_REST_Response */ public function get_orders_summary($request) { } /** * Get Preferences. * * @since 3.3.3 * * @return WP_Error|WP_HTTP_Response|WP_REST_Response * @throws Exception */ public function get_preferences() { } /** * Get our sample schema for preferences. */ public function get_preferences_schema() { } /** * Get our sample schema for order-summary. */ public function get_order_summary_schema() { } /** * Retrieves the query params for the posts collection. * * @since 4.7.0 * * @return array Collection parameters. */ public function get_collection_params() { } } class VendorProductCategoriesController extends \WC_REST_Product_Categories_Controller { /** * Endpoint namespace. * @since 4.0.0 * * @var string */ protected $namespace = 'dokan/v1'; /** * Register the routes for terms. */ public function register_routes() { } /** * Check if a given request has access to read items. * * Override the get_items_permissions_check method * @return boolean */ public function get_items_permissions_check($request): bool { } /** * Check if a given request has access to read a single item. * * Override the get_item_permissions_check method * @return boolean */ public function get_item_permissions_check($request): bool { } /** * Get all product categories. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_items($request) { } /** * Get a single product category. * * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_item($request) { } /** * Get the full nested product category tree. * * Returns the hierarchy as [ { value, label, children: [...] }, ... ] so the * product editor can render an indented category picker without embedding the * tree in the form schema. * * @since 5.0.5 * * @param WP_REST_Request $request Full details about the request. * * @return WP_REST_Response */ public function get_tree($request) { } } } namespace WeDevs\Dokan\Traits { trait RESTResponseError { /** * Send REST error response * * @since 3.0.0 * * @param \Exception $e * @param string $default_message * * @return \WP_Error */ protected function send_response_error(\Exception $e, $default_message = '') { } } } namespace WeDevs\Dokan\REST { class WithdrawController extends \WP_REST_Controller { use \WeDevs\Dokan\Traits\RESTResponseError; /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = 'withdraw'; /** * Register all routes related with withdraw. * * @return void */ public function register_routes() { } /** * Check permission for getting withdraw * * @since 2.8.0 * * @return bool */ public function get_items_permissions_check($request) { } /** * Check permission for get a withdraw * * @since 3.0.0 * * @param WP_REST_Request $request * * @return bool */ public function get_item_permissions_check($request) { } /** * Check permission for creating a withdraw request * * @since 3.0.0 * * @return bool */ public function create_item_permissions_check($request) { } /** * Check permission for update a withdraw * * @since 3.0.0 * * @param WP_REST_Request $request * * @return bool */ public function update_item_permissions_check($request) { } /** * Check permission for deleting withdraw * * @since 2.8.0 * * @return bool */ public function delete_item_permissions_check($request) { } /** * Check Permission for Wthdraw Payment Method Items. * * @since 3.8.3 * * @return bool */ public function get_payment_method_items_permissions_check($request) { } /** * Check permission for getting withdraw * * @since 2.8.0 * * @return bool */ public function batch_items_permissions_check() { } /** * Validate a withdraw is exists * * @since 3.0.0 * * @param int $id * * @return bool|\WP_Error */ public function withdraw_exists($id) { } /** * Get user data * * @since 2.8.0 * * @return array */ public function get_user_data($user_id) { } /** * Get withdraws * * @since 3.0.0 * * @return WP_REST_Response|WP_Error */ public function get_items($request) { } /** * Get vendor balance * * @return WP_REST_Response */ public function get_balance() { } /** * Make a withdraw request * * @since 3.0.0 * * @return WP_REST_Response */ public function create_item($request) { } /** * Get a withdraw * * @since 3.0.0 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_item($request) { } /** * Cancel withdraw status * * @since 3.0.0 * * @return WP_REST_Response|WP_Error */ public function update_item($request) { } /** * Delete a withdraw * * @since 3.0.0 * * @param WP_REST_Request $request * * @return WP_REST_Response|WP_Error */ public function delete_item($request) { } /** * Get Withdraw Payment Method Items. * * @since 3.8.3 * * @param WP_REST_Request $request * * @return WP_REST_Response */ public function get_payment_method_items($request) { } /** * Approve, Pending and cancel bulk action * * JSON data format for sending to API * { * "approved" : [ * "1", "9", "7" * ], * "pending" : [ * "2" * ], * "delete" : [ * "4" * ], * "cancelled" : [ * "5" * ] * } * * @since 2.8.0 * * @return WP_REST_Response|WP_Error */ public function batch_items($request) { } /** * Get all withdraw method charges. * * @since 3.9.6 * * @return WP_Error|\WP_HTTP_Response|WP_REST_Response */ public function get_all_method_charges() { } /** * Get withdraw method charge. * * @since 3.9.6 * * @return WP_Error|\WP_HTTP_Response|WP_REST_Response */ public function get_method_charge($request) { } /** * Prepare data for response * * @since 2.8.0 * * @param $withdraw \WeDevs\Dokan\Withdraw\Withdraw * @param $request \WP_REST_Request * * @return WP_REST_Response|WP_Error */ public function prepare_item_for_response($withdraw, $request) { } /** * Prepare Payment Method Item Data for Response. * * @since 3.8.3 * * @param string $payment_method * @param WP_REST_Request $request * * @return WP_REST_Response|WP_Error */ public function prepare_payment_method_item_for_response($payment_method, $request) { } /** * Format item's collection for response * * @param WP_REST_Response $response * @param WP_REST_Request $request * @param array $items * @param int $total_items * * @return object */ public function format_collection_response($response, $request, $total_items) { } /** * Prepare links for the request. * * @param \WeDevs\Dokan\Withdraw\Withdraw $object Object data. * @param WP_REST_Request $request Request object. * * @return array Links for the given post. */ protected function prepare_links($withdraw, $request) { } /** * Item schema * * @since DOKAN_LITE * * @return array */ public function get_item_schema() { } /** * Item Schema for Withdraw Payment Methods. * * @since DOKAN_LITE * * @return array */ public function get_payment_method_item_schema() { } /** * Schema for batch processing * * @since 3.0.0 * * @return array */ public function get_public_batch_schema() { } } class WithdrawControllerV2 extends \WeDevs\Dokan\REST\WithdrawController { /** * Endpoint namespace. * * @var string */ protected $namespace = 'dokan/v2'; /** * Register all routes releated with stores. * * @since 3.7.10 * * @return void */ public function register_routes() { } /** * Returns withdraw settings for vendors. * * @since 3.7.10 * * @return WP_REST_Response|WP_Error */ public function get_withdraw_settings() { } /** * Returns withdraw summary. * * @since 3.7.10 * * @return WP_REST_Response|WP_Error */ public function get_withdraw_summary() { } /**` * Make a withdraw method default for a vendor. * * @since 4.0.0 * * @param WP_REST_Request $request * * @return WP_REST_Response|WP_Error */ public function handle_make_default_method(\WP_REST_Request $request) { } /** * Get user data. * * @since 4.3.3 * * @param int $user_id User ID. * * @return array */ public function get_user_data($user_id) { } } /** * Dokan Withdraw Export Controller * * Handles withdraw report exports by implementing ExportableInterface * and extending WooCommerce's GenericController. * * @since 4.1.3 */ class WithdrawExportController extends \Automattic\WooCommerce\Admin\API\Reports\GenericController implements \Automattic\WooCommerce\Admin\API\Reports\ExportableInterface { protected $namespace = 'dokan/v1'; /** * Route base. * * @var string */ protected $rest_base = '/reports/withdraws'; /** * Get the column names for export. * * @return array Key value pair of Column ID => Label. */ public function get_export_columns() { } /** * Get the column values for export. * * @param array $item Single report item/row. * @return array Key value pair of Column ID => Value. */ public function prepare_item_for_export($item) { } /** * Get withdraw items for export. * * @param \WP_REST_Request $request Full details about the request. * @return \WP_REST_Response|\WP_Error */ public function get_items($request) { } /** * Get the query params for collections. * * @return array */ public function get_collection_params() { } /** * Check if a given request has access to read items. * * @param \WP_REST_Request $request Full details about the request. * @return \WP_Error|boolean */ public function get_items_permissions_check($request) { } } } namespace WeDevs\Dokan { /** * Vendor Registration * * @since 2.8 */ class Registration { /** * Nonce action marking a request as coming from Dokan's own vendor sign-up form. * * @since 5.0.19 * * @var string */ const VENDOR_FORM_NONCE_ACTION = 'dokan_vendor_registration_form'; /** * Field carrying the vendor sign-up form marker. * * @since 5.0.19 * * @var string */ const VENDOR_FORM_NONCE_FIELD = 'dokan_vendor_registration_form_nonce'; public function __construct() { } /** * Build the marker identifying Dokan's dedicated vendor sign-up form. * * @since 5.0.19 * * @return string */ protected function get_vendor_form_marker() { } /** * Print the marker identifying Dokan's dedicated vendor sign-up form. * * @since 5.0.19 * * @return void */ public function render_vendor_form_marker() { } /** * Add the marker to a rendered vendor sign-up form that did not print it itself. * * A theme override copied before the marker existed never fires the action, and the toggle would * then close that site's own vendor page with no way to tell why. Stamping the rendered markup * keeps such an override working, whatever it did to the form. * * @since 5.0.19 * * @param string $content Rendered vendor sign-up markup. * * @return string */ public function inject_vendor_form_marker($content) { } /** * Roles a visitor may register as through the request being processed. * * The appearance setting only hides the vendor option in the WooCommerce form's template, so a * role that form never offered has to be refused server side too. * * @since 5.0.19 * * @return array */ public function get_allowed_registration_roles() { } /** * Whether the request was submitted from Dokan's dedicated vendor sign-up form. * * @since 5.0.19 * * @return bool */ protected function is_vendor_form_request() { } /** * Validate vendor registration * * @param \WP_Error $error * * @return \WP_Error */ public function validate_registration($error) { } /** * Inject first and last name to WooCommerce for new vendor registraion * * @param array $data * * @return array */ public function set_new_vendor_names($data) { } /** * Adds default dokan store settings when a new vendor registers * * @param int $user_id * @param array $data * * @return void */ public function save_vendor_info($user_id, $data) { } /** * Adds address profile completion value in dokan settings. * * @3.10.2 * * @param int $vendor_id * @param array $new_dokan_settings * @param array $old_profile_settings * * @return array */ public function check_and_set_address_profile_completion($vendor_id, $new_dokan_settings, $old_profile_settings) { } /** * Validate nonce for seller registration. * This function checks the nonce value to ensure the request is valid and secure. * If the "dokan_register_nonce_check" filter returns false, the validation is bypassed, * third-party developers to override the nonce check if necessary. * * @return bool True if nonce is valid or validation is bypassed, false otherwise. */ protected function validate_nonce() { } } } namespace WeDevs\Dokan\ReverseWithdrawal\Admin { /** * Class Hooks * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal\Admin */ class Hooks { /** * Admin constructor. * * @since 3.5.1 */ public function __construct() { } /** * Exclude commission from report log if order contains advertisement product * * @since 3.5.1 * * @param bool $exclude * @param object $order * * @return bool */ public function report_log_exclude_commission($exclude, $order) { } /** * Maybe take action after settings has been saved * * @since 3.5.1 * * @param string $option_name * @param array $new_value * @param array $old_value * * @return void */ public function maybe_take_action($option_name, $new_value, $old_value) { } /** * Remove reverse withdrawal base product if page has been deleted * * @sience 3.5.1 * * @param int $post_id * * @return void */ public function delete_base_product($post_id) { } } /** * Class Settings * * @package WeDevs\Dokan\ReverseWithdrawal\Admin * * @since 3.5.1 */ class Settings { /** * Settings constructor. * * @since 3.5.1 */ public function __construct() { } /** * Load all settings fields * * @since 3.5.1 * * @param array $fields * * @return array */ public function load_settings_fields($fields) { } /** * Validates admin delivery settings * * @since 3.5.1 * * @param string $option_name * @param array $option_value * * @return void */ public function validate_admin_settings($option_name, $option_value) { } /** * Validates admin delivery settings * * @since 3.5.1 * * @param string $option_name * @param array $option_value * * @return void */ public function create_reverse_withdrawal_base_product($option_name, $option_value) { } } } namespace WeDevs\Dokan\ReverseWithdrawal { /** * Class Ajax * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class Ajax { /** * Ajax constructor. * * @since 3.5.1 */ public function __construct() { } /** * This method will add a product to cart from product edit page * * @since 3.5.1 * * @return void */ public function reverse_withdrawal_payment() { } } } namespace WeDevs\Dokan\ReverseWithdrawal\BackgroundProcess { /** * Async Requests * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal\BackgroundProcess */ class AsyncRequests { /** * Class Constructor * * @since 3.5.1 */ public function __construct() { } /** * Take actions for given vendors * * @since 3.5.1 * * @param array $args * * @return void */ public function maybe_take_actions($args = []) { } /** * Send billing invoice email * * @since 3.5.1 * * @param array $args * * @return void */ public function send_billing_invoice_email($args = []) { } } /** * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal\BackgroundProcess */ class CronActions { /** * CronActions constructor. * * @since 3.5.1 */ public function __construct() { } /** * Schedule an action with the hook 'dokan_reverse_withdrawal_midnight_cron' to run at midnight each day * so that our callback is run then. * * @since 3.5.1 * * @return void */ public function schedule_action() { } /** * This method will schedule/unscheduled monthly billing reminder cron * * @since 3.5.1 * * @param string $option_name * @param array $new_value * @param array $old_value * * @return void */ public function after_save_settings($option_name, $new_value, $old_value) { } /** * Take actions for unpaid vendors or revert taken actions * * @since 3.5.1 * * @return void */ public function maybe_take_action() { } /** * Send monthly billing reminder email to vendors * * @since 3.5.1 * * @return void */ public function send_billing_invoice_email() { } } } namespace WeDevs\Dokan\ReverseWithdrawal { /** * @package WeDevs\Dokan\ReverseWithdrawal * * @since 3.5.1 */ class Cache { /** * Class constructor * * @since 3.5.1 */ public function __construct() { } /** * Clear cache * * @since 3.5.1 * * @param array $data * * @return void */ public function clear_cache($data) { } } /** * Class Cart * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class Cart { /** * Cart constructor. * * @since 3.5.1 */ public function __construct() { } /** * Remove seller name on cart and other areas * * @since 3.5.1 * * @param array $item_data * @param array $cart_item * * @return array */ public function remove_seller_name_from_cart_item($item_data, $cart_item) { } /** * Add custom price into cart meta item. * * @since 3.5.1 * * @param \WC_Cart $cart for whole cart. */ public function woocommerce_custom_price_to_cart_item($cart) { } /** * This method will remove other products from cart if reverse withdrawal payment exists in cart. * * @since 3.5.1 * * @param bool $passed * @param int $product_id * * @return bool */ public static function prevent_purchasing_multiple_products($passed, $product_id) { } } /** * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class FailedActions { /** * Reverse pay actions * * @since 3.5.1 * * @param int $vendor_id * * @return void */ public function ensure_reverse_pay_actions($vendor_id) { } /** * Revert reverse pay taken actions * * @since 3.5.1 * * @param int $vendor_id * * @return void */ public function revert_reverse_pay_actions($vendor_id) { } /** * This method will make vendor status inactive * * @since 3.5.1 * * @param int $vendor_id * * @return void */ public function make_status_inactive($vendor_id) { } /** * This method will make vendor status active * * @since 3.5.1 * * @param int $vendor_id * @param bool $remove_action * * @return void */ public function make_status_active($vendor_id, $remove_action = false) { } /** * This method will remove a failed action for a vendor * * @since 3.5.1 * * @param int $vendor_id * @param string $action * * @return void */ public function remove_failed_action($vendor_id, $action) { } } /** * Helper class for reverse withdrawal * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class Helper { /** * This method will return option key for reverse withdrawal base product * * @since 3.5.1 * * @return string */ public static function get_base_product_option_key() { } /** * This method will return balance_threshold_exceed_date_key * * @since 3.5.1 * * @return string */ public static function balance_threshold_exceed_date_key() { } /** * This method will return failed actions key * * @return string */ public static function failed_actions_key() { } /** * Get reverse withdrawal failed payment actions * * @since 3.5.1 * * @return array|string return associated array of transaction types if no argument is provided. If $transaction_type is provided and if data exists then return the label otherwise return empty string */ public static function get_transaction_types($transaction_type = null) { } /** * Get reverse withdrawal failed payment actions * * @since 3.5.1 * * @param $vendor_id * * @return array */ public static function get_failed_actions_by_vendor($vendor_id) { } /** * Set reverse withdrawal failed payment actions * * @since 3.5.1 * * @param int $vendor_id * @param array $failed_actions * * @return void */ public static function set_failed_actions_by_vendor($vendor_id, $failed_actions) { } /** * This method will return the balance threshold exceeded date * * @since 3.5.1 * * @param $vendor_id * * @return string */ public static function get_balance_threshold_exceed_date($vendor_id) { } /** * This method will update the balance threshold exceeded date * * @since DOKA_SINCE * * @param int $vendor_id * @param string $date * * @return void */ public static function set_balance_threshold_exceed_date($vendor_id, $date = '') { } /** * This method will check if cart contain reverse withdrawal product * * @since 3.5.1 * * @return bool */ public static function has_reverse_withdrawal_payment_in_order($order) { } /** * This method will return reverse withdrawal payment amount * * @since 3.5.1 * * @param \WC_Abstract_Order $order * * @return float|bool false if meta key not found */ public static function get_balance_from_order(\WC_Abstract_Order $order) { } /** * Get reverse withdrawal base product id * * @since 3.5.1 * * @return int */ public static function get_reverse_withdrawal_base_product() { } /** * This method will check if a product is reverse withdrawal product * * @since 3.8.1 * * @param int $product_id * * @return bool */ public static function is_reverse_withdrawal_product($product_id) { } /** * This method will check if cart contain reverse withdrawal payment product * * @since 3.5.1 * * @return bool */ public static function has_reverse_withdrawal_payment_in_cart() { } /** * This method will return formatted transaction id * * @since 3.5.1 * * @param int $transaction_id * @param string $transaction_type * @param string $contex admin or seller * * @return string */ public static function get_transaction_url_from_transaction_id($transaction_id, $transaction_type, $contex = 'admin') { } /** * This method will return formatted transaction data * * @since 3.5.1 * * @param array $item * @param float $current_balance * @param string $context * * @return array */ public static function get_formated_transaction_data($item, &$current_balance, $context = 'admin') { } /** * This method will return default transaction data for vendor reverse withdrawal balance * * @since 3.5.1 * * @return array */ public static function get_default_transaction_date() { } /** * This method will return payable amount of a vendor for a month * * @param int $vendor_id * @param int|string $current_date * * @return float|WP_Error */ public static function get_vendor_payable_amount_by_month($vendor_id, $current_date) { } /** * This method will return payable balance of a vendor * * @since 3.5.1 * * @param int|null $vendor_id * @param int|string|null $current_date * * @return array|WP_Error */ public static function get_vendor_balance($vendor_id = null, $current_date = null) { } /** * This method will check if vendor needs to pay balance along with details data * * @since 3.5.1 * * @param int|null $vendor_id * * @return array|WP_Error */ public static function get_vendor_due_status($vendor_id = null, $current_date = null) { } /** * This method will check if a vendors need to pay their unpaid balance * * @since 3.5.1 * * @param int|null $vendor_id * * @return bool|WP_Error */ public static function is_balance_due($vendor_id = null) { } /** * This method will return formatted failed action messages * * @since 3.5.1 * * @return string */ public static function get_formatted_failed_actions() { } /** * This method will return formatted failed action messages * * @since 3.5.1 * * @param int $vendor_id * * @return string */ public static function get_formatted_failed_actions_by_vendor($vendor_id) { } /** * Get formatted billing type * * @since 3.7.16 * * @param string $billing_type * * @return array|string */ public static function get_formatted_billing_type($billing_type = '') { } /** * Get the total of the vendor's reverse withdrawal payments that are not in the ledger yet. * * A payment reaches the ledger only when its order is completed, so orders still waiting on that are * invisible to the balance and have to be accounted for separately before accepting another payment. * * @since 5.0.14 * * @param int $vendor_id * * @return float */ public static function get_awaiting_payment_total($vendor_id) { } /** * Total the reverse withdrawal payment amounts carried by a set of orders. * * @since 5.0.14 * * @param \WC_Order[] $orders * * @return float */ protected static function sum_payment_amounts(array $orders) { } /** * Get the vendor's reverse withdrawal payment orders that are still waiting to reach the ledger. * * @since 5.0.14 * * @param int $vendor_id * * @return \WC_Order[] */ public static function get_awaiting_payment_orders($vendor_id) { } /** * Build the message shown when an unfinished payment order is holding the balance. * * @since 5.0.14 * * @param \WC_Order[] $orders * * @return string */ protected static function get_awaiting_payment_message(array $orders) { } /** * This method will add reverse payment amount to cart * * @since 3.7.16 * * @param string $amount * * @return WP_Error|bool true if product is added to cart, WP_Error otherwise */ public static function add_payment_to_cart($amount) { } } /** * Class Hooks * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class Hooks { /** * Hooks constructor. * * @since 3.5.1 * * @return void */ public function __construct() { } /** * Skip cart validation for reverse withdrawal * * @since 4.0.2 * * @param bool $needs_validation Whether to skip cart validation. * * @return bool */ public function skip_cart_validation_for_reverse_withdraw(bool $needs_validation): bool { } /** * After reverse withdrawal is inserted * * After a reverse withdrawal entry is inserted, we will check if we had to take any actions or revert previous taken actions. * This will make sure immediate update of vendor status. * * @since 3.5.1 * * @param array $data * * @return void */ public function after_reverse_withdrawal_inserted($data) { } /** * Unset withdraw menu * * @since 3.5.1 * * @param array $menu * * @return array */ public function unset_withdraw_menu($menu) { } /** * This method will remove add to cart button * * @since 3.5.1 * * @param bool $purchasable * @param \WC_Product $product * * @return bool */ public function hide_add_to_cart_button($purchasable, $product) { } /** * This method will hide product price * * @since 3.5.1 * * @param string $price * @param \WC_Product $product * * @return string */ public function hide_product_price($price, $product) { } /** * Process order status changed * * @since 3.5.1 * * @param string $order_id * @param string $old_status * @param string $new_status * * @return void */ public function process_order_status_changed($order_id, $old_status, $new_status) { } /** * Add reverse withdrawal nav * * @since 3.5.1 * * @param array $urls * * @return array */ public function add_reverse_withdrawal_nav($urls) { } } /** * Class InstallerHelper * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class InstallerHelper { /** * Create Reverse Withdrawal Table * * @since 3.5.1 * * @return void */ public static function create_reverse_withdrawal_table() { } /** * This method will create reverse withdrawal base product * * @since 3.5.1 * * @return void */ public static function create_reverse_withdrawal_base_product() { } } /** * Database Manager Class * * @since 3.5.1 * * @class Manager * * @package WeDevs\Dokan\ReverseWithdrawal */ class Manager { /** * Table name for dokan_reverse_withdrawal table * * @var string * * @since 3.5.1 */ private $table; /** * Manager constructor. * * @since 3.5.1 */ public function __construct() { } /** * This method will return data from dokan_reverse_withdrawal table * * @since 3.5.1 * * @param array $args * * @return array|int|WP_Error */ public function all($args = []) { } /** * This method will get all/selected vendors balance * * @since 3.5.1 * * @param array $args * * @return array|WP_Error */ public function get_stores_balance($args = []) { } /** * This method will return current balance of a vendor * * @since 3.5.1 * * @param array $args * * @return float|WP_Error */ public function get_store_balance($args = []) { } /** * This method will get all the transactions for a vendor * * @since 3.5.1 * * @param array $args * * @return array|WP_Error */ public function get_store_transactions($args = []) { } /** * This method will return a single item from reverse withdrawal table * * @since 3.5.1 * * @param int $id * * @return WP_Error|array */ public function get($id = 0) { } /** * Insert a new item into database. * * @since 3.5.1 * * @param array $args * * @return int|WP_Error */ public function insert($args = []) { } /** * Check if reverse withdrawal already inserted for an order * * @since 3.5.1 * * @param int $order_id * * @return bool */ public function is_reverse_withdrawal_added($order_id) { } /** * Check if reverse withdrawal payment already inserted for an order * * @since 3.5.1 * * @param int $order_id * * @return bool */ public function is_payment_inserted($order_id) { } /** * This method will return all refunded amount for a specific order * * @since 3.5.1 * * @param int $order_id * * @return float */ public function get_total_refunded_amount_by_order($order_id) { } /** * This method will return all the payments made by a vendor in a date range * * @since 3.5.1 * * @param array $args * * @return WP_Error|float */ public function get_payments_by_vendor($args = []) { } /** * This method will return commission amount for a specific order * * @since 3.5.1 * * @param int $order_id * * @return float */ public function get_commission_amount_by_order($order_id) { } /** * This method will return unique stores under reverse withdrawal table * * @param array $args * * @since 3.5.1 * * @return array|WP_Error */ public function get_stores($args = []) { } /** * Get dokan_reverse_withdrawal table with prefix * * @since 3.5.1 * * @return string */ public function get_table() { } /** * This will check if given var is empty or not. * * @since 3.5.1 * * @param mixed $var * * @return bool */ protected function is_empty($var) { } } /** * Class Order * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class Order { /** * Marks an order whose payment was resolved without writing a ledger row. * * @since 5.0.14 * * @var string */ const PAYMENT_SETTLED_META = '_dokan_reverse_withdrawal_payment_settled'; /** * Order constructor. * * @since 3.5.1 */ public function __construct() { } /** * Insert reverse withdrawal payment info into database after order status has been completed. * * @since 3.5.1 * * @param int $order_id of the $order_id . * @param string $old_status old status of the order. * @param string $new_status this is new status of the order. * * @return void */ public function process_order_status_changed($order_id, $old_status, $new_status) { } /** * Insert reverse withdrawal payment into database after order status has been completed * * @since 3.5.1 * * @param int $order_id * * @return void */ public function process_payment($order_id) { } /** * This method will insert reverse withdrawal payment record into database * * @since 3.5.1 * * @param int $order_id * * @return void */ protected function insert_payment($order_id) { } /** * Stores reverse withdrawal payment amount under the line item meta. * * @since 3.5.1 * * @param \WC_Order_Item_Product $line_item The line item added to the order. * @param string $cart_item_key The key of the cart item being added to the cart. * @param array $cart_item The cart item data. */ public static function store_line_item_metas($line_item, $cart_item_key, $cart_item) { } /** * Hide meta key in the order. * * @since 3.5.1 * * @param string $display_key of the key. * @param object $meta for the meta data. * @param array $item array. * * @return string */ public function hide_order_item_meta_key($display_key, $meta, $item) { } /** * Hide meta key in the order. * * @since 3.5.1 * * @param mixed $display_value for the display item. * @param object $meta data of the order. * @param array $item item array. * * @return string */ public function hide_order_item_meta_value($display_value, $meta, $item) { } } /** * Reverse Withdrawal Class * * This class will be the base class for the reverse withdrawal feature * * @since 3.5.1 */ class ReverseWithdrawal { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Cloning is forbidden. * * @since 3.5.1 */ public function __clone() { } /** * Unserializing instances of this class is forbidden. * * @since 3.5.1 */ public function __wakeup() { } /** * Class constructor * * @since 3.5.1 */ public function __construct() { } /** * Set controllers * * @since 3.5.1 * * @return void */ private function set_controllers() { } /** * Initialize all hooks * * @since 3.5.1 * * @return void */ private function init_hooks() { } /** * Rest api class map * * @param array $classes * * @since 3.5.1 * * @return array */ public function rest_api_class_map($classes) { } } /** * @class SettingsHelper * * @since 3.5.1 * * @package WeDevs\Dokan\ReverseWithdrawal */ class SettingsHelper { /** * Check if reverse withdrawal feature is enabled * * @since 3.5.1 * * @return bool */ public static function is_enabled() { } /** * Get enabled payment gateways for reverse withdrawal * * @since 3.5.1 * * @return array */ public static function get_enabled_payment_gateways() { } /** * Check if gateway is enabled for reverse withdrawal * * @since 3.5.1 * * @return bool */ public static function is_gateway_enabled_for_reverse_withdrawal($gateway) { } /** * Get reverse withdrawal billing type * * @since 3.5.1 * * @return string */ public static function get_billing_type() { } /** * Get reverse withdrawal threshold limit * * @since 3.5.1 * * @return float */ public static function get_reverse_balance_threshold() { } /** * Get reverse withdrawal billing day * * @since 3.5.1 * * @return float */ public static function get_billing_day() { } /** * Get reverse withdrawal billing day * * @since 3.5.1 * * @return float */ public static function get_due_period() { } /** * Get reverse withdrawal failed payment actions * * @since 3.5.1 * * @return array */ public static function get_failed_actions() { } /** * Check if action is enabled for reverse withdrawal * * @since 3.5.1 * * @return bool */ public static function is_failed_action_enabled($action) { } /** * Check if display notification is enabled during due period for reverse withdrawal * * @since 3.5.1 * * @return bool */ public static function display_payment_notice_on_vendor_dashboard() { } /** * Check if sending announcement is enabled during due period for reverse withdrawal * * @since 3.5.1 * * @return bool */ public static function send_balance_exceeded_announcement() { } /** * Get reverse withdrawal payment gateways * * @since 3.5.1 * * @return array */ public static function get_reverse_withrawal_payment_gateways() { } /** * Get reverse withdrawal billing type * * @since 3.5.1 * * @return array */ public static function get_billing_type_options() { } /** * Get reverse withdrawal failed payment actions * * @since 3.5.1 * * @return array */ public static function get_failed_payment_actions() { } } } namespace WeDevs\Dokan { /** * Dokan rewrite rules class * * @package Dokan */ class Rewrites { public $query_vars = []; public $custom_store_url = ''; /** * Hook into the functions */ public function __construct() { } /** * Generate breadcrumb for store page * * @param array $crumbs * * @since 2.4.7 * * @return void | array $crumbs */ public function store_page_breadcrumb($crumbs) { } /** * Check if WooCommerce installed or not * * @return boolean */ public function is_woo_installed() { } /** * Register the rewrite rule * * @return void */ public function register_rule() { } /** * Resolve query var conflicts with WooCommerce * * @param array $query_vars * * @since 2.9.13 * * @return array */ public function resolve_wc_query_conflict($query_vars) { } /** * Register the query var * * @param array $vars * * @return array */ public function register_query_var($vars) { } /** * Include store template * * @param type $template * * @return string */ public function store_template($template) { } /** * Returns the terms_and_conditions template * * @param string $template * * @since 2.3 * * @return string */ public function store_toc_template($template) { } /** * Returns the edit product template * * @param string $template * * @return string */ public function product_edit_template($template) { } /** * Remove h1 tag in edit product page. * * @param $args * * @return mixed */ public function remove_h1_from_heading_in_edit_product_page($args) { } /** * Store query filter * * Handles the product filtering by category in store page * * @param object $query * * @return void */ public function store_query_filter($query) { } /** * Returns an array of arguments for ordering products based on the selected values. * * @since 3.2.7 * * @param string $orderby Order by param * @param string $order Order param * * @return array */ public function get_catalog_ordering_args($orderby = '', $order = '') { } /** * Handle numeric price sorting * * @since 3.2.7 * * @param array $args Query args * * @return array */ public function order_by_price_asc_post_clauses($args) { } /** * Handle numeric price sorting * * @since 3.2.7 * * @param array $args Query args * * @return array */ public function order_by_price_desc_post_clauses($args) { } /** * WP Core does not let us change the sort direction for individual orderby params * * This lets us sort by meta value desc, and have a second orderby param * * @since 3.2.7 * * @param array $args Query args * * @return array */ public function order_by_popularity_post_clauses($args) { } /** * Order by rating post clauses * * @since 3.2.7 * * @param array $args Query args * * @return array */ public function order_by_rating_post_clauses($args) { } /** * Join wc_product_meta_lookup to posts if not already joined. * * @since 3.2.7 * * @param string $sql SQL join * * @return string */ private function append_product_sorting_table_join($sql) { } /** * Flush rewrite rules if the version is 4.0 or above. * * @since 4.0.0 * * @return void */ public function maybe_flash_rewrite_rules() { } } } namespace WeDevs\Dokan\Shipping { /** * Shipping hooks class * * @since 3.7.19 * * @package WeDevs\Dokan\Shipping */ class Hooks { /** * Hooks constructor. * * @since 3.7.19 */ public function __construct() { } /** * Split shipping seller wise * * @since 3.7.19 Moved from pro. * * @param array $packages * * @return array */ public function split_shipping_packages($packages) { } /** * Added shipping meta after order * * @since 3.7.19 Moved from pro. * * @param WC_Order_Item_Shipping $item Shipping Line Item. * @param string $package_key Package key. * @param array $package Package. * @param WC_Order $order Order. * * @return void */ public function add_shipping_pack_meta($item, $package_key, $package, $order) { } /** * Set package wise seller name * * @since 3.7.19 Moved from pro. * * @param string $title Existing shipping pack name. * @param integer $i Pack ID. * @param array $package Shipping Package. * * @return string */ public function change_shipping_pack_name($title, $i, $package) { } /** * Add shipping tax rate based on vendor product items. * * @since 4.2.4 * * @param $rate \WC_Shipping_Rate * @param $args array * @param $wc_shipping_method \WC_Shipping_Method * * @return \WC_Shipping_Rate */ public function add_shipping_method_rate($rate, $args, $wc_shipping_method) { } } class Tax extends \WC_Tax { /** * Get tax rates for shipping * * @since 4.2.4 * * @param $args * * @return array */ public static function get_tax_rates($args) { } /** * Get shipping tax class from vendor cart items. * * @since 4.2.4 * * @param $args * * @return false|mixed|string|null */ private static function get_shipping_tax_class_from_vendor_cart_items($args) { } /** * Retrieves a list of unique tax classes for shipping from the provided vendor cart items. * * @static 4.2.4 * * @param array $cart_items An array of cart items. * * @return array An array of unique tax classes applicable to shipping for the provided cart items. */ public static function get_vendor_cart_item_tax_classes_for_shipping($cart_items) { } } } namespace WeDevs\Dokan\Shortcodes { class BestSellingProduct extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-best-selling-product'; /** * Render best selling products * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } class CustomerMigration extends \WeDevs\Dokan\Abstracts\DokanShortcode { /** * Shortcode name. * * @since 3.7.25 (PRO) * @since 3.14.10 Migration from DokanPro * * @var string Shortcode name */ protected $shortcode = 'dokan-customer-migration'; /** * Render [dokan-customer-migration] shortcode * * @since 3.7.25 (PRO) * @since 3.14.10 Migration from DokanPro * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } class Dashboard extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-dashboard'; /** * Load template files * * Based on the query vars, load the appropriate template files * in the frontend user dashboard. * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } /** * Fullwidth vendor layout * * @since 4.2.0 */ class FullWidthVendorLayout implements \WeDevs\Dokan\Contracts\Hookable { /** * Script/style handle key for vendor dashboard React app. * * @var string */ protected $script_key = 'dokan-vendor-dashboard'; /** * Register hooks. * * @return void */ public function register_hooks(): void { } /** * Update vendor layout style option. * * @since 4.2.0 * * @return void */ public function update_layout_style(): void { } /** * Load a custom fullwidth template. * * This method intercepts the template_include filter and returns * a custom blank template when fullwidth mode is activated. * The custom template preserves wp_head() and wp_footer() hooks * to ensure all enqueued scripts and styles are loaded properly. * * @since 4.2.0 * * @param string $template Path to the template * * @return string Modified template path */ public function rewrite_vendor_dashboard_template($template) { } /** * Register and enqueue React vendor dashboard assets when viewing the seller dashboard. * * @since 4.2.0 * * @return void */ public function register_vendor_dashboard_assets() { } /** * Enqueue React vendor dashboard assets when viewing the seller dashboard. * * @since 4.2.0 * * @return void */ public function enqueue_vendor_dashboard_assets() { } } class MyOrders extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-my-orders'; /** * Render my orders page * * @return string */ public function render_shortcode($atts) { } } class Shortcodes { private $shortcodes = []; /** * Register Dokan shortcodes * * @since 3.0.0 * @since 3.14.10 Added dokan-customer-migration shortcode. * * @return void */ public function __construct() { } /** * Get registered shortcode classes * * @since 3.0.0 * * @return array */ public function get_shortcodes() { } } class Stores extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-stores'; /** * Displays the store lists * * @since 2.4 * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } class TopRatedProduct extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-top-rated-product'; /** * Render top rated products via shortcode * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } class VendorOnboardingRegistration extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-vendor-onboarding-registration'; /** * Vendor onboarding form shortcode callback * * @since 5.0.0 * * Supported attributes: * - show_login (yes|no) Show the login form. Default: yes. * - show_registration (yes|no) Show the vendor registration form. Default: yes. * * Hiding one section centers the other in the layout. * * @param array $atts * * @return string */ public function render_shortcode($atts) { } } class VendorRegistration extends \WeDevs\Dokan\Abstracts\DokanShortcode { protected $shortcode = 'dokan-vendor-registration'; /** * Vendor regsitration form shortcode callback * * @return string */ public function render_shortcode($atts) { } } } namespace WeDevs\Dokan\ThemeSupport { /** * Astra Theme Support * * @since 3.1 */ class Astra { /** * The constructor */ public function __construct() { } /** * Remove sidebar from store and dashboard page * * @param string $layout * * @return string */ public function remove_sidebar($layout) { } public function payment_request_button_style() { } /** * Bridge Astra's global button presets onto Dokan store and store listing page buttons. * * Astra emits its Global > Buttons preset on `button` / `.button` / `input[type="submit"]`, * all of which Dokan's `.dokan-btn` rules outrank, so vendor store and store listing pages * silently ignore the theme's button geometry while every other page on the site honours it. * * @since 5.0.11 * * @return void */ public function inherit_theme_button_presets() { } /** * Check that every Astra helper the button bridge reads through is loaded. * * @since 5.0.11 * * @return bool */ protected function has_astra_button_helpers() { } /** * Build the button preset CSS for every breakpoint Astra exposes. * * @since 5.0.11 * * @return string */ protected function build_button_preset_css() { } /** * Map the CSS properties the bridge emits for a single device. * * Empty values are left in place for Astra to drop, so a preset the admin never * configured keeps falling through to Dokan's own styling instead of blanking it. * * @since 5.0.11 * * @param array $preset Astra button options keyed by the role they play here. * @param string $device One of `desktop`, `tablet` or `mobile`. * * @return array */ protected function get_button_properties(array $preset, $device) { } /** * Selector list that carries the preset onto Dokan's buttons. * * @since 5.0.11 * * @return string */ protected function get_button_selector() { } /** * Refresh the customizer preview whenever a bridged button setting changes. * * Astra live-previews its own buttons over postMessage, which never reloads the preview * frame, so the server-built bridge CSS would stay stale inside the customizer and store * page buttons would look out of sync exactly where the admin is configuring them. * * @since 5.0.11 * * @return void */ protected function sync_customizer_preview() { } /** * Whitelist a CSS length value. * * Astra returns theme option data verbatim when it is not a well formed responsive array, * so nothing from the customizer is trusted before it reaches the style block. * * @since 5.0.11 * * @param mixed $value Raw value returned by an Astra helper. * @param bool $allow_rem_fallback Astra folds a rem fallback into pixel font sizes (`16px;font-size:1.0666rem`). * * @return string */ protected function sanitize_css_length($value, bool $allow_rem_fallback = false) { } } /** * Divi Theme Support * * @see https://www.elegantthemes.com/gallery/divi/ * * @since 3.0 */ class Divi { /** * The constructor */ public function __construct() { } /** * Remove sidebar from store and dashboard page * * @return void */ public function remove_sidebar() { } /** * Reset style * * @return void */ public function style_reset() { } /** * Makes the store and dashboard page full width * * @param array $classes * * @return array */ public function full_width_page($classes) { } /** * Set current page for the query * * @since 3.0.5 * * @see https://github.com/weDevsOfficial/dokan/issues/838 * * @param \WP_Query $query * @param array $store_info * * @return void */ public function set_current_page($query, $store_info) { } /** * Use divi theme assets when product is empty in store. * * @since 3.2.15 * * @return void */ public function use_dynamic_assets_for_empty_product() { } } /** * Electro Theme Support * * @see https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624?ref=wedevs * * @since 2.9.30 */ class Electro { /** * The constructor */ public function __construct() { } /** * Reset store listing style * * @since 2.9.30 * * @return void */ public function store_listing_style() { } } /** * Enfold Theme Support * * @see https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?ref=wedevs * * @since 2.9.30 */ class Enfold { /** * The constructor */ public function __construct() { } /** * Filter layout class * * @since 2.9.30 * * @param array $classes * * @return array */ public function filter_layout_classes($classes) { } /** * Reset store listing style * * @since 2.9.30 * * @return void */ public function store_listing_style() { } } /** * Flatsome Theme Support * * @see https://themeforest.net/item/flatsome-multipurpose-responsive-woocommerce-theme/5484319?ref=wedevs * * @since 3.0 */ class Flatsome { /** * The constructor */ public function __construct() { } /** * Enqueue registration scripts as it opens on popup * * @return void */ public function enqueue_scripts() { } /** * Store page fix * * @return void */ public function store_page() { } /** * Product edit page * * @return void */ public function edit_page() { } /** * Page wrapper div * * @return void */ public function start_wrapper() { } /** * Wrapper div ends * * @return void */ public function end_wrapper() { } /** * Reset store listing style * * @since 2.9.30 * * @return void */ public function store_listing_style() { } } /** * Dokan Theme Support * * @since 3.0 * * @package Dokan */ class Manager { /** * Constructor */ public function __construct() { } /** * Include supported theme compatibility * * @return void */ private function include_support() { } /** * Format theme name. ( Remove `-theme` from the string ) * * @since 2.9.30 * * @param string $string * * @return string */ private function format($string) { } } /** * Rehub Theme Support * * @since 2.9.17 */ class Rehub { /** * The constructor */ public function __construct() { } /** * Remove hamburger menu * * @since 2.9.17 * * @return boolean */ public function load_hamburger_menu() { } /** * Make store listing page full width * * @since 3.0.0 * * @return void */ public function set_content_type() { } } /** * Storefront Theme Support * * @see https://woocommerce.com/storefront/ * * @since 3.0 */ class Storefront { /** * The constructor */ public function __construct() { } /** * Remove sidebar from store and dashboard page * * @return void */ public function remove_sidebar() { } /** * Makes the store and dashboard page full width * * @param array $classes * * @return array */ public function full_width_page($classes) { } /** * Reset style * * @since 2.9.30 * * @return void */ public function reset_style() { } } /** * Twenty Twenty Theme Support * * @since 3.1 */ class TwentyTwenty { /** * The constructor */ public function __construct() { } /** * Makes the store page full width * * @param array $classes * * @return array */ public function add_wc_class($classes) { } } } namespace WeDevs\Dokan { /** * Dokan tracker * * @since 2.4.11 * @since 2.8.7 Using AppSero\Insights for tracking */ class Tracker { /** * Insights class * * @var \Appsero\Insights */ public $insights = null; /** * Class constructor * * @return void * @since 2.8.7 * */ public function __construct() { } /** * Initialize the plugin tracker * * @return void * @since 2.8.7 * */ public function appsero_init_tracker_dokan() { } /** * Get number of orders * * @return int */ protected function get_order_count() { } /** * Gets custom deactivation reasons * * @param string[] $reasons * @param null|\AppSero\Client $client * * @return \array * @since 3.0.15 * */ public function get_custom_deactivation_reasons($reasons, $client = null) { } } } namespace WeDevs\Dokan\Traits { /** * Singleton Trait * * @since 1.0.0 */ trait Singleton { /** * Singleton class instance holder * * @since 1.0.0 * * @var static */ protected static $instance; /** * Make a class instance * * @since 1.0.0 * * @return static */ public static function instance() { } } } namespace WeDevs\Dokan\Upgrade { class AdminNotice { use \WeDevs\Dokan\Traits\AjaxResponseError; /** * Show admin notice to upgrade Dokan * * @since 3.0.0 * * @param array $notices * * @return array */ public static function show_notice($notices) { } /** * Ajax handler method to initiate Dokan upgrade process * * @since 3.0.0 * * @return void */ public static function do_upgrade() { } } class Hooks { /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } } class Manager { private $is_upgrading_db_key = 'dokan_is_upgrading_db'; /** * Checks if update is required or not * * @since 3.0.0 * * @return bool */ public function is_upgrade_required() { } /** * Checks for any ongoing process * * @since 3.0.0 * * @return bool */ public function has_ongoing_process() { } /** * Get upgradable upgrades * * @since 3.0.0 * * @return array */ public function get_upgrades() { } /** * Run upgrades * * This will execute every method found in a * upgrader class, execute `run` method defined * in `DokanUpgrader` abstract class and then finally, * `update_db_version` will update the db version * reference in database. * * @since 3.0.0 * * @return void */ public function do_upgrade() { } } class Upgrades { /** * Dokan Lite upgraders * * @since 3.0.0 * * @var array */ private static $upgrades = ['1.2' => \WeDevs\Dokan\Upgrade\Upgrades\V_1_2::class, '2.1' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_1::class, '2.3' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_3::class, '2.4.11' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_4_11::class, '2.4.12' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_4_12::class, '2.5.7' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_5_7::class, '2.6.9' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_6_9::class, '2.7.3' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_7_3::class, '2.7.6' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_7_6::class, '2.8.0' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_8_0::class, '2.8.3' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_8_3::class, '2.8.6' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_8_6::class, '2.9.4' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_9_4::class, '2.9.13' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_9_13::class, '2.9.16' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_9_16::class, '2.9.19' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_9_19::class, '2.9.23' => \WeDevs\Dokan\Upgrade\Upgrades\V_2_9_23::class, '3.0.4' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_0_4::class, '3.0.10' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_0_10::class, '3.1.0' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_1_0::class, '3.1.1' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_1_1::class, '3.2.12' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_2_12::class, '3.3.1' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_3_1::class, '3.3.7' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_3_7::class, '3.3.8' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_3_8::class, '3.5.1' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_5_1::class, '3.6.2' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_6_2::class, '3.6.4' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_6_4::class, '3.6.5' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_6_5::class, '3.7.10' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_7_10::class, '3.7.19' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_7_19::class, '3.13.0' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_13_0::class, '3.14.0' => \WeDevs\Dokan\Upgrade\Upgrades\V_3_14_0::class, '5.0.0' => \WeDevs\Dokan\Upgrade\Upgrades\V_5_0_0::class]; /** * Get DB installed version number * * @since 3.0.0 * * @return string */ public static function get_db_installed_version() { } /** * Checks if upgrade is required or not * * @since 3.0.0 * * @param bool $is_required * * @return bool */ public static function is_upgrade_required($is_required = false) { } /** * Update Dokan DB version * * @since 3.0.0 * * @return void */ public static function update_db_dokan_version() { } /** * Get upgrades * * @since 3.0.0 * * @param array $upgrades * * @return array */ public static function get_upgrades($upgrades = []) { } } } namespace WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses { /** * Update vendor and product geolocation data * * @since 2.8.6 */ class V_2_8_3_VendorBalance extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Perform updates * * @since 2.8.6 * * @param mixed $item * * @return mixed */ public function task($item) { } /** * Add new table for vendor-balance * * @since 2.8.3 * * @return void */ private function create_vendor_balance_table_283() { } /** * Get order table data */ private function migrate_order_data_283($paged) { } /** * Get withdraw table data */ private function migrate_withdraw_data_283($paged) { } /** * Get insert vendor_balance table data */ private function insert_vendor_balance_data_283($data) { } } /** * Dokan 2.9.4 updater class * * @since 2.9.4 */ class V_2_9_4_OrderPostAuthor extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Perform updates * * @since 2.9.4 * * @param mixed $item * * @return mixed */ public function task($item) { } /** * Update shop_order post author * * @since 2.9.4 * * @return array */ private function update_shop_order_post_author($paged) { } } /** * Dokan 2.9.16 updater class * * @since 2.9.16 */ class V_2_9_16_StoreSettings extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Perform updates * * @since 2.9.16 * * @param mixed $item * * @return mixed */ public function task($item) { } /** * Update store settings * * @since 2.9.16 * * @return void */ private function update_store_settings($paged) { } } /** * Dokan store name updater class * * @since 2.9.23 */ class V_2_9_23_StoreName extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Perform updates * * @since 2.9.23 * * @param mixed $item * * @return mixed */ public function task($item) { } /** * Update store settings * * @since 2.9.23 * * @return void|array */ private function update_store_name($paged) { } } /** * Dokan Product attribute author id updater class * * @since 3.0.10 */ class V_3_0_10_ProductAttributesAuthorId extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Perform updates * * @param mixed $item * * @since 3.0.10 * * @return mixed */ public function task($item) { } /** * Update product attribute author * if its not same as product author id * * @param $paged * * @since 3.0.10 * * @return array|boolean */ private function update_product_attribute_author($paged) { } } /** * Dokan Product attribute author id updater class * * @since 3.1.1 */ class V_3_1_1_RefundTableUpdate extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Action * * @since 3.1.1 * * @var string */ protected $action = 'dokan_upgrade_bp_3_1_1'; /** * Perform updates * * @param mixed $item * * @since 3.1.1 * * @return mixed */ public function task($db_data) { } } /** * Dokan vendor store times upgrader class. * * @since 3.3.8 */ class V_3_3_8_VendorStoreTimes extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Update vendors store time. * * @param array $vendors * * @since 3.3.8 * * @return bool */ public function task($vendors) { } } /** * Select all parent categories based on child category id. * * @since 3.6.2 */ class V_3_6_2_UpdateProductCategories extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Save all ancestors ids based on child id. * * @param array $products * * @since 3.6.2 * * @return bool */ public function task($products) { } } /** * Set additional order meta `shipping_tax_fee_recipient`. * * @since 3.7.19 */ class V_3_7_19_UpdateOrderMeta extends \WeDevs\Dokan\Abstracts\DokanBackgroundProcesses { /** * Save order meta `shipping_tax_fee_recipient`. * * @param array $orders * * @since 3.7.19 * * @return bool */ public function task($orders) { } } } namespace WeDevs\Dokan\Upgrade\Upgrades { class V_1_2 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function generate_sync_table() { } /** * Generate dokan sync table * * @since 3.8.0 moved from includes/functions.php file * * @deprecated since 2.4.3 */ private static function dokan_generate_sync_table() { } } class V_2_1 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function create_announcement_table() { } } class V_2_3 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Upgrade necessary meta for * new product design * * @since 2.3 * * @return void */ public static function upgrade_product_meta() { } /** * Upgrade store meta for sellers * and replace old address meta with new address meta * * @since 2.3 * * @return void */ public static function upgrade_store_meta() { } } class V_2_4_11 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Upgrade capabilities for sellers * * @since 2.4.11 * * @return void */ public static function upgrade_seller_capability() { } /** * Add new table for refund request * * @since 2.4.11 * * @return void */ public static function create_refund_table() { } } class V_2_4_12 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Upgrade meta for sellers * * @since 2.4.12 * * @return void */ public static function upgrade_seller_meta() { } } class V_2_5_7 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function remove_notice_meta() { } } class V_2_6_9 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function update_user_capability() { } public static function replace_seller_commission() { } public static function replace_seller_commission_by_seller() { } public static function replace_product_commissions() { } public static function replace_category_commission_meta() { } } class V_2_7_3 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Save admin fee as meta for existing sub-orders */ public static function update_order_meta() { } /** * Modify column structure to support upto 4 decimals */ public static function update_table_structure() { } /** * Update seller capabilities * * @since 2.7.3 * * @return void */ public static function update_user_capabilities() { } } class V_2_7_6 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Modify ip column to support the max possible length of IPv6 */ public static function update_table_structure() { } public static function update_user_capabilities() { } } class V_2_8_0 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Remove product_style option from database */ public static function remove_product_style_option() { } } class V_2_8_3 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Add new table for vendor-balance * * @since 2.8.3 * * @return void */ public static function create_vendor_balance_table_283() { } } class V_2_8_6 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update extra fee recipient settings * * @since 2.8.6 * * @return void */ public static function update_fees_recipient() { } } class V_2_9_4 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update post_author id for shop_orders * * @since 2.9.4 * * @return void */ public static function update_shop_order_post_author() { } /** * Update refund table structure * * @return void */ public static function update_refund_table() { } } class V_2_9_13 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update single product multi vendor module table * * @return void */ public static function update_spmv_product_map_table() { } } class V_2_9_16 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update update store settings * * @since 2.9.16 * * @return void */ public static function update_store_settings() { } } class V_2_9_19 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function dokan_update_admin_settings_next() { } } class V_2_9_23 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update update store settings * * @since 2.9.23 * * @return void */ public static function dokan_update_store_name() { } } class V_3_0_4 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Get table_name and columns in key value pair * * @since 3.0.4 * * @return array */ public static function get_tables() { } /** * Update various dokan tables * * @since 3.0.4 * * @return void */ public static function update_dokan_tables() { } } class V_3_0_10 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update product attribute id to same as product author id * * @return void */ public static function update_product_attributes_author_id() { } } class V_3_1_0 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Remove any numeric indexed data from withdraw_methods added due to dokan setup wizard * * @return void */ public static function update_dokan_withdraw_methods() { } } class V_3_1_1 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update dokan refund table fields item_totals and item_tax_totals * * @return void */ public static function update_dokan_refund_table() { } } class V_3_2_12 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update withdraw table for add new `details` column * * @since 3.2.12 * * @return void */ public static function update_dokan_withdraw_table() { } /** Update store name meta data * * @since 3.2.12 * * @return void */ public static function dokan_update_store_name() { } } class V_3_3_1 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Updates withdraw database table column * * @since 3.3.1 * * @return void */ public static function update_withdraw_table_column() { } /** * Updates refund database table column * * @since 3.3.1 * * @return void */ public static function update_refund_table_column() { } /** * This will add installed time for existing users * * @since 3.3.1 * * @return void */ public static function add_version_info() { } } class V_3_3_7 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Updates withdraw database table column. Before on dokan_withdraw * table details column it was set longtext NOT NUll, now we are setting it null by default. * * @since 3.3.7 * * @return void */ public static function update_withdraw_table_column() { } /** * Flush rewrite rules so that new menu is visible without permalink reset * * @since 3..3.7 * * @return void */ public static function flush_rewrite_rules() { } } class V_3_3_8 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Updates usermeta database table column. Before on, * store time gets single data in usermeta. Now, we * are setting data as array for multiple store times. * * @since 3.3.8 * * @return void */ public static function update_withdraw_table_column() { } } /** * @since 3.5.1 */ class V_3_5_1 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Create Reverse Withdrawal Table * * @since 3.5.1 * * @return void */ public static function install_advertisement_table() { } /** * This method will create reverse withdrawal base product * * @since 3.5.1 * * @return void */ public static function create_reverse_withdrawal_base_product() { } /** * Flush rewrite rules * * @since 3.5.1 * * @return void */ public static function flush_rewrite_rules() { } } class V_3_6_2 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Updates product categories. * For every child category, it will update the parent categories and ancestors. * * @since 3.6.2 * * @return void */ public static function update_products_categories() { } } class V_3_6_4 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Remove unfiltered_html capabilities from vendor roles * * @since 3.6.4 * * @return void */ public static function remove_unfiltered_html_capabilities_from_vendor() { } } class V_3_6_5 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Delete product category cache * * @since 3.6.5 * * @return void */ public static function clear_multistep_category_cache() { } } /** * Upgrader Class. * * @since 3.7.10 */ class V_3_7_10 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Rewrite variable product variations author IDs. * * @since 3.7.10 * * @return void */ public static function rewrite_variable_product_variations_author_ids() { } } class V_3_7_19 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update Order meta. * Add new meta `shipping_tax_fee_recipient` * * @since 3.7.19 * * @return void */ public static function update_order_meta() { } } class V_3_13_0 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { public static function resync_wc_order_stats_to_sync_dokan_stats() { } } class V_3_14_0 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Update global commission settings. * * @since 3.14.0 * * @return void */ public static function update_global_commission_type() { } /** * Update vendor and product comission settings. * * @since 3.14.0 * * @return void */ public static function update_commission() { } } /** * Upgrade class for version 5.0.0. * * @since 5.0.0 */ class V_5_0_0 extends \WeDevs\Dokan\Abstracts\DokanUpgrader { /** * Alter dokan_order_stats table to add new columns and regenerate data. * * @since 5.0.0 * * @return void */ public static function alter_dokan_order_stats_table_and_regenerate() { } /** * Create Vendor Onboarding page if it doesn't exist. * * @since 5.0.0 * * @return void */ public static function create_vendor_onboarding_page() { } } } namespace WeDevs\Dokan\Utilities { class AdminSettings { /** * Get new seller selling status setting. * We are placing this function here because this function may access from admin and front-end both. * * @since 4.0.2 * * @param string $status * * @return string */ public function get_new_seller_enable_selling_status($status = '') { } /** * Dokan new seller enable selling statuses. * * @since 4.0.2 * * @return array */ public function new_seller_enable_selling_statuses() { } } class OrderUtil { /** * Helper function to get whether custom order tables are enabled or not. * * This method can be removed, and we can directly use WC OrderUtil::custom_orders_table_usage_is_enabled method in future * if we set the minimum wc version requirements to 8.0 * * @since 3.8.0 * * @return bool */ public static function is_hpos_enabled(): bool { } /** * Checks if posts and order custom table sync are enabled, and there are no pending orders. * * @since 3.8.0 * * @return bool */ public static function is_custom_order_tables_in_sync(): bool { } /** * Helper function to get whether the order cache should be used or not. * * @since 3.8.0 * * @return bool True if the order cache should be used, false otherwise. */ public static function is_order_cache_usages_enabled(): bool { } /** * Helper function to initialize the global $theorder object, mostly used during order meta boxes rendering. * * @since 3.8.0 * * @param WC_Order|WP_Post $post_or_order_object Post or order object. * * @return WC_Order_Refund|bool|WC_Order WC_Order object. */ public static function init_theorder_object($post_or_order_object) { } /** * Helper function to id from a post or order object. * * @since 3.8.0 * * @param WP_Post|WC_Order $post_or_order_object WP_Post/WC_Order object to get ID for. * * @return int Order or post ID. */ public static function get_post_or_order_id($post_or_order_object): int { } /** * Checks if passed id, post or order object is a WC_Order object. * * This method can be removed, and we can directly use WC OrderUtil::is_order method in future * if we set the minimum wc version requirements to 8.0 * * @since 3.8.0 * * @param int|WP_Post|WC_Order $order_id Order ID, post object or order object. * @param string[] $types Types to match against. * * @return bool Whether the passed param is an order. */ public static function is_order($order_id, $types = []): bool { } /** * Helper function to get the screen name of order page in wp-admin. * * This method can be removed, and we can directly use WC OrderUtil::get_order_admin_screen method in future * if we set minimum wc version requirements to 8.0 * * @since 3.8.0 * * @return string */ public static function get_order_admin_screen(): string { } /** * Get admin order list page url * * @since 3.8.0 * * @return string */ public static function get_admin_order_list_url(): string { } /** * Helper method to generate admin URL for new order. * * @since 3.8.0 * * @return string Link for new order. */ public static function get_order_admin_new_url(): string { } /** * Get admin order edit page url * * @since 3.8.0 * * @param int $order_id * * @return string */ public static function get_admin_order_edit_url($order_id = 0): string { } /** * Get the custom orders table name for wc. * * @since 3.8.0 * * @return string */ public static function get_order_table_name() { } /** * Get the name of the database table that's currently in use for orders. * * @since 3.8.0 * * @return string */ public static function get_table_for_order_meta() { } /** * Determine whether customer-identifying details (billing/shipping address, billing full name, customer email) * should be rendered in vendor order emails. * * Centralizes the gate so the same hook value is honored across all vendor email templates * (vendor-new-order / vendor-completed-order, HTML and plain text). * * @since 5.0.2 * * @param WC_Order $order Order object. * * @return bool True to render customer details, false to hide. */ public static function should_show_email_customer_details($order): bool { } /** * Whether the current user may act on the given order in a bulk operation. * * A vendor may act only on their own orders; admins and shop managers (manage_woocommerce) * may act on any order. Centralizing this keeps every bulk-order entry point — the REST * bulk-actions endpoint and the legacy vendor-dashboard bulk form — guarded by one rule. * * @since 5.0.11 * * @param int|string $order_id Order id to check. * * @return bool */ public static function current_user_can_manage_order($order_id): bool { } } /** * ReportUtil class * * @since 4.0.0 */ class ReportUtil { /** * Check if analytics is enabled for the current seller. * * This checks if the seller is enabled and the analytics toggle option is set to "yes". * * @since 4.0.0 * * @return bool True if analytics is enabled, false otherwise. */ public static function is_analytics_enabled(): bool { } /** * Check if product listing is belongs to Report menu * * @since 4.0.0 * * @return bool */ public static function is_report_products_url(): bool { } /** * Get the excluded order statuses for analytics. * * @since 4.1.0 * * @return array List of excluded order statuses. */ public static function get_exclude_order_statuses(): array { } } /** * Utility class for cleaning and normalizing rich text content. * * @since 4.3.1 */ class RichTextSanitizerUtil { /** * Sanitize and clean rich text content. * * Strips all HTML tags, decodes HTML entities, and removes special/invisible * characters such as BOMs, zero-width spaces, and control characters. * * @since 4.3.1 * * @param string $text The text to sanitize and clean. * * @return string Sanitized and cleaned plain text. */ public static function sanitize_richtext_content(string $text): string { } /** * Replace rich text special characters. * * @since 4.3.1 * * @see sitepress-multilingual-cms/vendor/wpml/wpml/src/Core/Component/WordsToTranslate/Domain/Calculator/PrepareContent/Rules/UnicodeTrait.php * * @param string $text The text containing special characters. * * @return string Text with special characters replaced or removed. */ protected static function replace_richtext_chars(string $text): string { } } class VendorUtil { /** * Get the vendor default store banner URL. * * @since 4.0.6 * * @return string The default store banner URL. */ public static function get_vendor_default_banner_url(): string { } /** * Get the vendor default store avatar URL. * * @since 4.0.6 * * @return string */ public static function get_vendor_default_avatar_url(): string { } /** * Get the vendor/store ID associated with a user. * * This method determines the vendor ID based on the user's role: * - Vendors: Returns their own user ID as the vendor ID * - Vendor staff: Returns their parent vendor's ID (stored in user meta) * - Other users: Returns 0 if not associated with any vendor * * @since 4.2.5 * * @param int $user_id Optional. The user ID to get the vendor ID for. Defaults to 0 (current user). * * @return int The vendor/store ID. Returns 0 if the user is not a vendor or vendor staff, * or if vendor ID cannot be determined. */ public static function get_vendor_id_for_user(int $user_id = 0): int { } } } namespace WeDevs\Dokan\Vendor { /** * ApiMeta Class. * * Handles Dokan vendor user meta registration for the REST API. */ class ApiMeta { /** * Constructor. */ public function __construct() { } /** * Registers Dokan specific user data to the WordPress user API. * * @since 4.2.5 * * @return void */ public function register_user_data() { } /** * Fetches the vendor-specific user data values for returning via the REST API. * * @since 4.2.5 * * @param array $user Current user data from REST API. * @return array Vendor-specific user data including vendor_id. */ public function get_user_data_values($user) { } /** * We store some Dokan specific user meta attached to users endpoint, * so that we can track certain preferences or values for vendors. * Additional fields can be added in the function below, and then used via Dokan's currentUser data. * * @since 4.2.5 * * @return array Fields to expose over the WP user endpoint. */ public function get_user_data_fields() { } /** * Helper to retrieve user data fields. * * @since 4.2.5 * * @param int $user_id User ID. * @param string $field Field name. * @return mixed The user field value. */ public static function get_user_data_field($user_id, $field) { } } /** * Change product status * * @since 3.7.18 */ class ChangeProductStatus extends \WeDevs\Dokan\Abstracts\ProductStatusChanger { /** * Get products * * @since 3.7.18 * * @return int[] */ public function get_products() { } } class Coupon { public const DOKAN_COUPON_META_KEY = '_dokan_coupon_info'; public function __construct() { } /** * Removes coupon information from an order item when a coupon is deleted. * * This function: * - Retrieves the coupon code from the order item. * - Removes the coupon discount from all applicable items in the order. * - If the order has sub-orders, it ensures the coupon is also removed from all child orders. * - If it's a sub-order, it removes the coupon from relevant items in the parent order. * * @param int $item_id The ID of the order item representing the coupon. * * @return void * * @throws Exception If there is an issue initializing the WC_Order_Item_Coupon object. */ public function remove_coupon_info_from_order_item($item_id) { } /** * Get Product IDs from order items and remove coupon discount from items. * * @param $removed_coupon * @param $order_items * * @return array * * @throws Exception */ private function remove_coupon_discount_from_items($removed_coupon, $order_items): array { } /** * Intercepts coupon application to handle line-item coupon discounts. * WooCommerce removes the coupon from the order and recalculates totals. For reference, see: * * @see https://github.com/woocommerce/woocommerce/blob/8abd6e97ca598381cb07287a2e7b735799cb55d5/plugins/woocommerce/includes/abstracts/abstract-wc-order.php#L1339 * WooCommerce does not provide a direct hook to retrieve coupon amounts per line items from the WC_Discounts object. * However, the `get_discounts` method of the `WC_Discounts` class allows access to this information. * This implementation utilizes the following steps to calculate line-item discounts: * 1. Remove the interfering WC hook used by Dokan hook. * 2. Reapply the coupon to the order or cart. * 3. Trigger the Dokan action to apply the coupon to the order or cart. * 4. Reattach the interfering WC hook used by Dokan hook. * * @param int $apply_quantity The number of items to which the coupon applies. * @param object $item The cart or order item object. * @param WC_Coupon $coupon The coupon being applied. * @param WC_Discounts $discounts The discount object managing the coupon. * * @return int */ public function intercept_wc_coupon(int $apply_quantity, $item, \WC_Coupon $coupon, \WC_Discounts $discounts): int { } /** * Save coupon discount data for an item. * * @param WC_Coupon $coupon The coupon being applied. * @param WC_Discounts $discounts Discount object. * @param object $item The cart or order item object. * * @return void * @throws Exception */ public function save_item_coupon_discount(\WC_Coupon $coupon, \WC_Discounts $discounts, $item): void { } /** * Save coupon data to a cart item. * * @param WC_Coupon $coupon The coupon being applied. * @param WC_Discounts $discounts Discount object. * @param object $item The cart item object. * * @return void */ protected function save_coupon_data_to_cart_item(\WC_Coupon $coupon, \WC_Discounts $discounts, $item): void { } /** * Save coupon data to an order item. * * @param WC_Coupon $coupon The coupon being applied. * @param WC_Discounts $discounts Discount object. * @param object $item The order item object. * @param WC_Order $order The order object. * * @return void * @throws Exception */ protected function save_coupon_data_to_order_item(\WC_Coupon $coupon, \WC_Discounts $discounts, $item, \WC_Order $order): void { } /** * Process coupon for child orders. * * @param WC_Order $order * @param WC_Coupon $coupon * * @return void * @throws Exception */ public function apply_coupon_to_child_orders(\WC_Order $order, \WC_Coupon $coupon): void { } /** * @param WC_Order $order * @param string $removed_coupon * @return void */ private function remove_coupon_from_child_orders(\WC_Order $order, string $removed_coupon) { } /** * Add coupon info to an order item during checkout. * * @param WC_Order_Item_Product $item The order item object. * @param string $cart_item_key The cart item key. * @param array $values Cart item values. */ public function add_coupon_info_to_order_item($item, $cart_item_key, $values): void { } /** * Remove coupon info from a cart item when a coupon is removed. * * @param string $coupon_code The coupon code being removed. */ public function remove_coupon_info_from_cart_item(string $coupon_code): void { } } class DokanOrderLineItemCouponInfo { private $discount = 0; private $coupon_code = ''; private $per_qty_amount = 0; private $quantity = 0; private $admin_coupons_enabled_for_vendor = ''; /** * Expected types are 'from_vendor' or 'from_admin' or 'shared' or '' * @var string Coupon commission type */ private $coupon_commissions_type = ''; private $admin_shared_coupon_type = ''; private $admin_shared_coupon_amount = ''; private bool $subsidy_supported = true; /** * Check if subsidy is supported * * @since 4.0.0 * * @return bool */ public function is_subsidy_supported(): bool { } /** * Set subsidy supported * * @since 4.0.0 * * @param bool $subsidy_supported * * @return void */ public function set_subsidy_supported(bool $subsidy_supported): void { } /** * Get coupon info * * @since 4.0.0 * * @return array */ public function get_coupon_info(): array { } /** * Set coupon info * * @since 4.0.0 * * @param $coupon_info * * @return $this */ public function set_coupon_info($coupon_info): self { } /** * Get discount amount * * @since 4.0.0 * * @return float */ public function get_discount(): float { } /** * Set discount amount * * @since 4.0.0 * * @param float $discount * * @return $this */ public function set_discount(float $discount): self { } /** * Get coupon code * * @since 4.0.0 * * @return string */ public function get_coupon_code(): string { } /** * Set coupon code * * @since 4.0.0 * * @param string $coupon_code * * @return $this */ public function set_coupon_code(string $coupon_code): self { } /** * Get per qty amount * * @since 4.0.0 * * @return float */ public function get_per_qty_amount(): float { } /** * Set per qty amount * * @since 4.0.0 * * @param float $per_qty_amount * * @return $this */ public function set_per_qty_amount(int $per_qty_amount): self { } /** * Get quantity * * @since 4.0.0 * * @return int */ public function get_quantity(): int { } /** * Set quantity * * @since 4.0.0 * * @param int $quantity * * @return $this */ public function set_quantity(int $quantity): self { } /** * Get admin coupons enabled for vendor * * @since 4.0.0 * * @return string */ public function get_admin_coupons_enabled_for_vendor(): string { } /** * Set admin coupons enabled for vendor * * @since 4.0.0 * * @param string $admin_coupons_enabled_for_vendor * * @return $this */ public function set_admin_coupons_enabled_for_vendor(string $admin_coupons_enabled_for_vendor): self { } /** * Get coupon commissions type * * @since 4.0.0 * * @return string */ public function get_coupon_commissions_type(): string { } /** * Set coupon commissions type * * @since 4.0.0 * * @param string $coupon_commissions_type * * @return $this */ public function set_coupon_commissions_type(string $coupon_commissions_type): self { } /** * Get admin shared coupon type * * @since 4.0.0 * * @return string */ public function get_admin_shared_coupon_type(): string { } /** * Set admin shared coupon type * * @since 4.0.0 * * @param string $admin_shared_coupon_type * * @return $this */ public function set_admin_shared_coupon_type(string $admin_shared_coupon_type): self { } /** * Get admin shared coupon amount * * @since 4.0.0 * * @return string */ public function get_admin_shared_coupon_amount(): string { } public function set_admin_shared_coupon_amount(string $admin_shared_coupon_amount): self { } /** * Get vendor discount * * @since 4.0.0 * * @return float */ public function get_vendor_discount() { } /** * Get admin discount * * @since 4.0.0 * * @return float */ public function get_admin_discount() { } } class Hooks { /** * Class constructor * * @since 3.3.2 Added Cache * * @return void */ public function __construct() { } } /** * Vendor Manager Class * * @since 2.6.10 */ class Manager { /** * The statuses the vendor listing knows how to filter on. * * @since 5.1.1 * * @var string[] */ const STATUSES = ['all', 'approved', 'pending']; /** * Total vendors found * * @var integer */ private $total_users; /** * Get all vendors * * @param array $args * * @since 2.8.0 * * @return array */ public function all($args = []) { } /** * Get vendors * * `status` accepts 'all', 'approved' or 'pending' (string or array); asking for both halves * means everyone and anything unrecognised falls back to 'approved'. Pending is applied * through the `dokan_pending_only` query var, which `exclude_approved_vendors()` acts on. * * @param array $args * * @return array */ public function get_vendors($args = []) { } /** * Collapse the requested statuses into the single filter the query applies. * * Only 'all', 'approved' and 'pending' are understood. Asking for both halves — or for 'all' * outright — means everyone. Anything else names no status this listing can filter on, so it * falls back to the default rather than widening the result, the same way * `Abilities\Definitions\VendorsQuery::resolve_status()` coerces an unknown status. * * @since 5.1.1 * * @param string|string[] $status * * @return string One of 'all', 'approved' or 'pending'. */ protected function resolve_status($status): string { } /** * Drop every approved vendor from a user query that asked for pending ones only. * * A correlated NOT EXISTS rides the usermeta index and stops at the first match per row. * * @since 5.1.1 * * @param \WP_User_Query $query * * @return void */ public function exclude_approved_vendors($query) { } /** * Get total user according to query * * @since 1.0.0 * * @return int */ public function get_total() { } /** * Get single vendor data * * @param object|integer $vendor * * @return object|Vendor instance */ public function get($vendor) { } /** * Create a vendor * * @param array $data * * @return Vendor|WP_Error on failure */ public function create($data = []) { } /** * Update a vendor * * @param int $vendor_id * * @param array $data * * @return object */ public function update($vendor_id, $data = []) { } /** * Delete vendor with reassign data * * @param $vendor_id * @param null $reassign * * @since 2.9.11 * * @return array */ public function delete($vendor_id, $reassign = null) { } /** * Get all featured Vendor * * @param array $args * * @return array */ public function get_featured($args = []) { } /** * Activate a vendor (enable selling). * * @since 5.0.2 * * @param int $vendor_id * * @return array|\WP_Error */ public function activate($vendor_id) { } /** * Deactivate a vendor (disable selling). * * @since 5.0.2 * * @param int $vendor_id * * @return array|\WP_Error */ public function deactivate($vendor_id) { } } } namespace WeDevs\Dokan\Vendor\SettingsApi\Abstracts { /** * Vendor Settings Payment processor. * * @since 3.7.10 */ abstract class Gateways { /** * Hook Order for setting rendering. * * @var int */ protected $hook_order = 10; /** * Settings Group Key for setting rendering. * * @var string */ protected $group = ''; /** * Constructor function. */ public function __construct() { } /** * Render the settings page with tab, cad, fields. * * @since 3.7.10 * * @param array $settings Settings to render. * * @return array */ abstract public function render_settings(array $settings): array; } /** * Vendor Settings Page. */ abstract class Page { /** * Hook Order for setting rendering. * * @var int */ protected $hook_order = 10; /** * Settings Group Key for setting rendering. * * @var string */ protected $group = ''; /** * Constructor function. */ public function __construct() { } /** * Render the settings page with tab, cad, fields. * * @since 3.7.10 * * @param array $settings Settings to render. * * @return array */ abstract public function render_settings(array $settings): array; /** * Render the settings page with tab, cad, fields. * * @since 3.7.10 * * @param array $groups Settings Group or page to render. * * @return array */ abstract public function render_group(array $groups): array; } } namespace WeDevs\Dokan\Vendor\SettingsApi { /** * Vendor Settings API Manager. * * @since 3.7.10 */ class Manager { /** * Constructor. */ public function __construct() { } /** * Initialize the class instance. * * @since 3.7.10 * * @return void */ private function init() { } } /** * Dokan Vendor Settings API Processor. * * @since 3.7.10 */ class Processor { /** * The Vendor Of the Settings. * * @since 3.7.10 * * @var Vendor */ protected $vendor; /** * Constructor. * * @param int $vendor Vendor ID. * * @return void */ public function __construct($vendor = 0) { } /** * Get main Settings page list. * * @since 3.7.10 * * @return array */ public function get_settings_page_list() { } /** * Get settings Group or page. * * @param string $group_id Group or page ID. * * @return array|WP_Error */ public function get_settings_group(string $group_id) { } /** * Get A single Settings Element. * * @since 3.7.10 * * @param string $group_id Group or page key. * @param string $id Settings Element id. * * @return array|WP_Error */ public function get_single_settings(string $group_id, string $id) { } /** * Get Single Settings Fiend from a settings Section. * * @since 3.7.10 * * @param string $group_id Group or page key. * @param string $parent_id Settings Element ID. * @param string $id Settings Element Field ID. * * @return array|WP_Error */ public function get_single_settings_field(string $group_id, string $parent_id, string $id) { } /** * Populate settings link section. * * @param array $settings Settings array. * * @return array */ public function populate_settings_links_value($settings) { } /** * Populate settings link section. * * @param array $settings Settings Element. * * @return array */ public function populate_single_settings_links_value($settings) { } /** * Populate value and active state for every payment fields. * * @param array $settings Single settings field. * * @return array */ public function populate_settings_elements($settings) { } /** * Format and validate Settings Elements. * * @param string $settings_group_id Settings elements group ID. * @param array $settings_values Settings elements. * * @return array * @throws Exception If settings is not found. */ public function format_settings_elements_for_saving(string $settings_group_id, array $settings_values) { } /** * Save settings group value. * * @since 3.7.10 * * @param array $settings Settings to save. * @param string $group_id Settings group ID. * * @return array|WP_Error */ public function save_settings_group(array $settings, string $group_id) { } /** * Save settings child value. * * @param string $group_id Group identifier. * @param string $id Settings elements identifier. * @param mixed $value Settings elements value to save. * * @return array|WP_Error */ public function save_single_settings(string $group_id, string $id, $value) { } /** * Save settings child value. * * @param string $group_id Group identifier. * @param string $settings_id Settings identifier. * @param string $field_id Field identifier. * @param mixed $value Value to save. * * @return array|WP_Error */ public function save_single_settings_field(string $group_id, string $settings_id, string $field_id, $value) { } /** * Search Group by Group or page key. * * @since 3.7.10 * * @param string $group_id Group or page key. * * @return bool|WP_Error */ protected function search_group(string $group_id) { } /** * Search Single Settings. * * @since 3.7.10 * * @param string $group_id Group or page key. * @param string $id Settings Element id. * * @return mixed|WP_Error */ protected function search_single_settings(string $group_id, string $id) { } } } namespace WeDevs\Dokan\Vendor\SettingsApi\Settings\Pages\Payments\Gateways { /** * Payment processor Bank. * * @since 3.7.10 */ class Bank extends \WeDevs\Dokan\Vendor\SettingsApi\Abstracts\Gateways { /** * Render the settings page for bank. * * @since 3.7.10 * * @param array $settings Settings to render. * * @return array */ public function render_settings(array $settings): array { } } /** * Payment processor PayPal. * * @since 3.7.10 */ class PayPal extends \WeDevs\Dokan\Vendor\SettingsApi\Abstracts\Gateways { /** * Render the settings for PayPal. * * @since 3.7.10 * * @param array $settings Settings to render. * * @return array */ public function render_settings(array $settings): array { } } } namespace WeDevs\Dokan\Vendor\SettingsApi\Settings\Pages\Payments { /** * Payment Settings API Page. * * @since 3.7.10 */ class Payments extends \WeDevs\Dokan\Vendor\SettingsApi\Abstracts\Page { /** * Constructor */ public function __construct() { } /** * Group or page key. * * @var string $group Group or page key. */ protected $group = 'payment'; /** * Render the settings page with tab, cad, fields. * * @since 3.7.10 * * @param array $groups Settings Group or page to render. * * @return array */ public function render_group(array $groups): array { } /** * Render the payment settings page. * * @since 3.7.10 */ public function render_settings(array $settings): array { } /** * Set the active payment processor status. * * @since 3.7.10 * * @param array $settings Settings Element. * * @return array */ public function set_active_payment_methods_status(array $settings, array $settings_values, string $parent_id) { } } } namespace WeDevs\Dokan\Vendor\SettingsApi\Settings\Pages { class Store extends \WeDevs\Dokan\Vendor\SettingsApi\Abstracts\Page { /** * Group or page key. * * @var string $group Group or page key. */ protected $group = 'store'; /** * Render the settings page with tab, cad, fields. * * @since 3.7.10 * * @param array $groups Settings Group or page to render. * * @return array */ public function render_group(array $groups): array { } /** * Render the store settings page. * * @since 3.7.10 */ public function render_settings(array $settings): array { } } } namespace WeDevs\Dokan\Vendor { /** * Seller setup wizard class */ class SetupWizard extends \WeDevs\Dokan\Admin\SetupWizard { /** * @var int */ public $store_id; /** * @var array */ public $store_info; /** * Hook in tabs. */ public function __construct() { } // define the woocommerce_registration_redirect callback public function filter_woocommerce_registration_redirect($url) { } /** * Show the setup wizard. */ public function setup_wizard() { } /** * Enqueue vendor setup wizard scripts * * @since 3.7.0 * * @return void */ public function frontend_enqueue_scripts() { } /** * Setup Wizard Header. */ public function setup_wizard_header() { } /** * Setup Wizard Footer. */ public function setup_wizard_footer() { } /** * Introduction step. */ public function dokan_setup_introduction() { } /** * Store step. */ public function dokan_setup_store() { } /** * Save store options. */ public function dokan_setup_store_save() { } /** * Payment step. */ public function dokan_setup_payment() { } /** * Save payment options. */ public function dokan_setup_payment_save() { } /** * Final step. */ public function dokan_setup_ready() { } /** * Gets the URL for the next step in the wizard * * Handles special logic to skip the payment step if no withdrawal methods * are active, preventing users from accessing an empty payment step * * @since 2.9.27 * * @return string The URL for the next step */ public function get_next_step_link(): string { } /** * Sets up the wizard steps * * Defines the steps for the setup wizard, conditionally including * the payment step only if active withdrawal methods exist * * @since 2.9.27 * * @return void */ protected function set_steps() { } } /** * Store Lists Class * * @since 2.9.30 */ class StoreListsFilter { /** * WP_User_Query holder * * @var object */ private $query; /** * Orderby holder * * @var string */ private $orderby; /** * Boot method * * @since 2.9.30 * * @return void */ public function __construct() { } /** * Maybe disable the store lists filter form * * @since 2.9.30 * * @return void */ public function maybe_disable_stote_lists_filter() { } /** * Filter area * * @since 2.9.30 * * @param WP_Users $stores * * @return void */ public function filter_area($stores) { } /** * Get sort by options * * @since 2.9.30 * * @return array */ public static function sort_by_options() { } /** * Filter pre user query * * @since 2.9.30 * * @param array $args * @param array $request * * @return array */ public function filter_pre_user_query($args, $request) { } /** * Filter user query * * @since 2.9.30 * * @param WP_User_Query * * @return void */ public function filter_user_query($query) { } /** * Filter query form * * @since 2.9.30 * * @return void */ private function filter_query_from() { } /** * Filter query orderby * * @since 2.9.30 * * @return void */ private function filter_query_orderby() { } } /** * User Switching functionality * * @since 3.0.6 */ class UserSwitch { /** * Load automatically when class initiate * * @since 3.0.6 */ public function __construct() { } /** * Is feature active or not * * @since 3.0.6 * * @return boolean */ public function is_feature_active() { } /** * Add localize scription for loading if feature available or not * * @since 3.0.6 * * @return array */ public function add_localize_data($localize_data) { } /** * Populate switch url for user * * @since 3.0.6 * * @return array */ public function populate_switch_url($data, $store, $request) { } /** * Switch to or Switch Back to user message in vendor dashboard * * @since 3.0.6 * * @return void */ public function show_user_switching_message() { } } /** * Dokan Vendor * * @since 2.6.10 */ #[\AllowDynamicProperties] class Vendor { /** * Set class public properties * * @since 3.7.19 * * @return void */ public function __set($key, $value) { } /** * Get public properties * * @since 3.7.19 * * @return mixed|null */ public function __get($key) { } /** * The vendor ID * * @var integer */ public $id = 0; /** * Holds the user data object * * @var null|WP_User */ public $data = null; /** * Holds the store info * * @var array */ private $shop_data = array(); /** * Holds the chanages data * * @var array */ private $changes = array(); /** * The constructor * * @param int|WP_User $vendor */ public function __construct($vendor = null) { } /** * Magic method to access vendor properties * * When you try to access a property by calling a method * with 'get_' prefixed, this magic method will look into * shop_data for that property. * * @param string $name * @param array $param * * @return mixed|void */ public function __call($name, $param) { } /** * Vendor info to array * * @since 2.8 * * @return array */ public function to_array() { } /** * Check if key is exist * * @param $key * * @return string */ public function get_value($key) { } /** * Check if the user is vendor * * @return boolean */ public function is_vendor() { } /** * If the selling capacity is enabled * * @return boolean */ public function is_enabled() { } /** * If the vendor is marked as trusted * * @return boolean */ public function is_trusted() { } /** * If the vendor is marked as featured * * @return boolean */ public function is_featured() { } /** * If reset sub category is enabled * * @return boolean */ public function get_reset_sub_category() { } /** * Populate store info * * @return void */ public function popluate_store_data() { } /* |-------------------------------------------------------------------------- | Getters |-------------------------------------------------------------------------- */ /** * Get the store info by lazyloading * * @return array */ public function get_shop_info() { } /** * Get store info by key * * @param string $item * * @return mixed */ public function get_info_part($item) { } /** * Get store ID * * @since 3.0.0 * * @return int */ public function get_id() { } /** * Get the vendor name * * @return string */ public function get_name() { } /** * Get the shop name * * @return string */ public function get_shop_name() { } /** * Get the shop URL * * @return string */ public function get_shop_url() { } /** * Get email address * * @return string */ public function get_email() { } /** * Get first name * * @since 2.8 * * @return string */ public function get_first_name() { } /** * Get last name * * @since 2.8 * * @return string */ public function get_last_name() { } /** * Get last name * * @since 2.8 * * @return string */ public function get_register_date() { } /** * Get the shop name * * @return array */ public function get_social_profiles() { } /** * Get the shop payment profiles * * @return array */ public function get_payment_profiles() { } /** * Get the phone name * * @return string */ public function get_phone() { } /** * Get the shop address * * @return array */ public function get_address() { } /** * Get the shop location * * @return array */ public function get_location() { } /** * Get the store banner URL. * * This method first checks if a specific banner ID is set for the store and retrieves it. If not set, * it falls back to the default store banner defined in the Dokan settings. * * @since 4.0.6 Applied default banner image. * * @return string */ public function get_banner(): string { } /** * Get the shop banner id * * @since 2.9.13 * * @return int */ public function get_banner_id() { } /** * Get the shop profile icon. * * @since 2.8 * @since 4.0.6 Applied default vendor profile image. * * @return string */ public function get_avatar() { } /** * Get shop gravatar id * * @since 2.9.13 * * @return int */ public function get_avatar_id() { } /** * If should show the email * * @return boolean */ public function show_email() { } /** * Check if terms and conditions enabled * * @since 2.8 * * @return boolean */ public function toc_enabled() { } /** * Get terms and conditions * * @since 2.8 * * @return string */ public function get_toc() { } /** * Get a vendor products * * @return object */ public function get_products() { } /** * Get a vendor all published products * * @since 3.2.11 * * @return array */ public function get_published_products() { } /** * Get a vendor all published products * * @since 3.2.11 * * @return array */ public function get_best_selling_products() { } /** * Get a vendor store published products categories * * @param bool $best_selling * * @since 3.2.11 * * @return array */ public function get_store_categories($best_selling = false) { } /** * Get vendor used terms list. * * @since 3.5.0 * * @param $vendor_id * @param $taxonomy * * @return array|mixed */ public function get_vendor_used_terms_list($vendor_id, $taxonomy) { } /** * Get vendor orders * * @since 3.0.0 * * @return WP_Error|WC_Order[] objects */ public function get_orders($args = []) { } /** * Get the total sales amount of this vendor * * @return float */ public function get_total_sales() { } /** * Get total pageview for all the products * * @return integer */ public function get_product_views() { } /** * Get vendor total earnings * * @return float|string float if formatted is false, string otherwise */ public function get_earnings($formatted = true, $on_date = '') { } /** * Get balance * * @since 3.0.0 * * @param bool $formatted * @param string $on_date * * @return float|string float if formatted is false, string otherwise */ public function get_balance($formatted = true, $on_date = '') { } /** * Get vendor rating * * @since 3.0.0 * * @return array */ public function get_rating() { } /** * Get vendor readable rating * * @since 3.0.0 * * @return void|string */ public function get_readable_rating($display = true) { } /** * Make vendor active * * @since 2.8.0 * * @return array */ public function make_active() { } /** * Make vendor inactive * * @since 2.8.0 * * @return array */ public function make_inactive() { } /** * Change product status when toggling seller active status * * @since 2.6.9 * @since 3.7.18 introduced new bg process to change product status * * @param string $task_type * * @return void */ public function change_product_status($task_type) { } /** * Get store opening closing time * * @return array */ public function get_store_time() { } /** * Get store opening closing time * * @return boolean|null on failure */ public function is_store_time_enabled() { } /** * Get store open notice * * @param string $default_notice * * @return string */ public function get_store_open_notice($default_notice = '') { } /** * Get store close notice * * @param string $default_notice * * @return string */ public function get_store_close_notice($default_notice = '') { } /* |-------------------------------------------------------------------------- | Setters |-------------------------------------------------------------------------- */ /** * Set enable tnc * * @param int value */ public function set_enable_tnc($value) { } /** * Set store tnc * * @since 3.0.0 * * @param string * * @return void */ public function set_store_tnc($value) { } /** * Set gravatar * * @param int value */ public function set_gravatar_id($value) { } /** * Set banner * * @param int value */ public function set_banner_id($value) { } /** * Set banner * * @param int value */ public function set_icon($value) { } /** * Set store name * * @param string */ public function set_store_name($value) { } /** * Set phone * * @param string */ public function set_phone($value) { } /** * Set show email * * @param string */ public function set_show_email($value) { } /** * Set show email * * @param string */ public function set_fb($value) { } /** * Set show email * * @param string */ public function set_gplus($value) { } /** * Set show email * * @param string */ public function set_twitter($value) { } /** * Set show email * * @param string */ public function set_pinterest($value) { } /** * Set show email * * @param string */ public function set_linkedin($value) { } /** * Set show email * * @param string */ public function set_youtube($value) { } /** * Set TikTok * * @param string */ public function set_tiktok($value) { } /** * Set show email * * @param string */ public function set_instagram($value) { } /** * Set threads * * @param string */ public function set_threads($value) { } /** * Set flickr * * @param string */ public function set_flickr($value) { } /** * Set paypal email * * @param string $value */ public function set_paypal_email($value) { } /** * Set bank ac name * * @param string $value */ public function set_bank_ac_name($value) { } /** * Set bank ac type * * @param string $value */ public function set_bank_ac_type($value) { } /** * Set bank ac number * * @param string $value */ public function set_bank_ac_number($value) { } /** * Set bank name * * @param string $value */ public function set_bank_bank_name($value) { } /** * Set bank address * * @param string value */ public function set_bank_bank_addr($value) { } /** * Set bank routing number * * @param string value */ public function set_bank_routing_number($value) { } /** * Set bank iban * * @param string $value */ public function set_bank_iban($value) { } /** * Set bank swtif number * * @param string $value */ public function set_bank_swift($value) { } public function set_address($value) { } /** * Set street 1 * * @param string $value */ public function set_street_1($value) { } /** * Set street 2 * * @param string $value */ public function set_street_2($value) { } /** * Set city * * @param string $value */ public function set_city($value) { } /** * Set zip * * @param string $value */ public function set_zip($value) { } /** * Set state * * @param string $value */ public function set_state($value) { } /** * Set country * * @param string $value */ public function set_country($value) { } /** * Sets a prop for a setter method. * * This stores changes in a special array so we can track what needs saving * the the DB later. * * @since 2.9.11 * * @param string $prop Name of prop to set. * @param mixed $value Value of the prop. */ protected function set_prop($prop, $value) { } /** * Get vendor meta data * * @since 2.9.23 * * @param string $key * @param bool $single Whether to return a single value * * @return mixed|null|false */ public function get_meta($key, $single = false) { } /** * Update vendor meta data * * @since 2.9.11 * * @param string $key * @param mixed $value * * @return void */ public function update_meta($key, $value) { } /** * Update meta data * * @since 2.9.23 * * @return void */ public function update_meta_data() { } /** * Sets a prop for a setter method. * * @since 2.9.11 * * @param string $prop Name of prop to set. * @param string $social Name of social settings to set, fb, twitter * @param string $value */ protected function set_social_prop($prop, $social = 'social', $value = '') { } /** * Set address props * * @param string $prop * @param string $address * @param string value */ protected function set_address_prop($prop, $address = 'address', $value = '') { } /** * Set payment props * * @param string $prop * @param string $paypal * @param mix value */ protected function set_payment_prop($prop, $paypal = 'paypal', $value = '') { } /** * Set store open close props * * @param string $prop * @param array $value * * @since 2.9.13 * * @return void */ protected function set_store_open_close_prop($prop, $value) { } /** * Set store times * * @param array $data * * @since 2.9.13 * * @return void */ public function set_store_times(array $data) { } /** * Set store times enable * * @param boolean $value * * @since 2.9.13 * * @return void */ public function set_store_times_enable($value) { } /** * Set store times open notice * * @param string $value * * @since 2.9.13 * * @return void */ public function set_store_times_open_notice($value) { } /** * Set store times close notice * * @param string $value * * @since 2.9.13 * * @return void */ public function set_store_times_close_notice($value) { } /** * Merge changes with data and clear. * * @since 2.9.11 */ public function apply_changes() { } /** * Save the object * * @since 2.9.11 */ public function save() { } /** * Returns vendor commission settings data. * * @since 3.14.0 * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function get_commission_settings() { } /** * Saves commission settings. * * @since 3.14.0 * * @param array $commission * * @return \WeDevs\Dokan\Commission\Model\Setting */ public function save_commission_settings($commission = []) { } /** * Get vendor profile url for admin * * @since 3.10.2 * * @return string */ public function get_profile_url(): string { } } /** * Vendor Cache class. * * Manage all of the caches for vendor. * * @since 3.3.2 * * @see \WeDevs\Dokan\Cache */ class VendorCache { public function __construct() { } /** * Clear vendor cache group. * * @since 3.3.2 * * @return void */ public static function delete() { } /** * Clear Vendor Cache Group. * * @since 3.3.2 * * @param int $vendor_id * * @return void */ public function clear_cache_group($vendor_id) { } /** * Clear Vendor Cache Group after vendor profile update. * * @since 3.3.2 * * @param int $store_id * @param array $dokan_settings * * @return void */ public function after_update_vendor_profile($store_id, $dokan_settings) { } /** * Clear Vendor Cache Group after changing wp_user. * * @since 3.3.5 * * @param int $user_id * @param bool $is_user_delete; if user deletes, pass it to true. default - false * * @return void */ private function clear_wp_user_cache($user_id, $is_user_delete = false) { } /** * Clear Vendor Cache Group after new user added to wp user. * * @since 3.3.2 * * @param int $user_id * * @return void */ public function after_created_new_wp_user($user_id) { } /** * Clear Vendor Cache Group after updated wp user. * * @since 3.3.5 * * @param int $user_id * @param array $old_user_data * * @return void */ public function after_updated_wp_user($user_id, $old_user_data) { } /** * Clear Vendor Cache Group before deleting wp user. * * @since 3.3.5 * * @param int $user_id * @param array $reassign * * @return void */ public function before_deleting_wp_user($user_id, $reassign) { } } } namespace WeDevs\Dokan { class VendorNavMenuChecker { /** * @since 4.0.0 * * @var array $template_dependencies List of template dependencies. * [ 'route' => [ ['slug' => 'template-slug', 'name' => 'template-name' (Optional), 'args' = [] (Optional) ] ] ] */ protected array $template_dependencies = ['withdraw' => [['slug' => 'withdraw/withdraw-dashboard'], ['slug' => 'withdraw/withdraw'], ['slug' => 'withdraw/header'], ['slug' => 'withdraw/status-listing'], ['slug' => 'withdraw/pending-request-listing'], ['slug' => 'withdraw/approved-request-listing'], ['slug' => 'withdraw/cancelled-request-listing'], ['slug' => 'withdraw/tmpl-withdraw-request-popup'], ['slug' => 'withdraw/request-form'], ['slug' => 'withdraw/pending-request-listing-dashboard']]]; /** * Forcefully resolved dependencies. * * Using `dokan_is_dashboard_nav_dependency_resolved` filter hook. * * @since 4.0.0 * * @var array $forcefully_resolved_dependencies List of forcefully resolved dependencies. */ protected array $forcefully_resolved_dependencies = []; /** * Constructor. */ public function __construct() { } /** * Get template dependencies. * * @since 4.0.0 * * @return array */ public function get_template_dependencies(): array { } /** * Convert menu items to react menu items * * @since 4.0.0 * * @param array $menu_items Menu items. * * @return array */ public function convert_to_react_menu(array $menu_items): array { } /** * Rewrite URL to React route if applicable. * * @since 4.0.8 * * @param string $url URL. * @param string $name Name. * @param bool $new_url New URL. * * @return string */ public function maybe_rewrite_to_react_route(string $url, $name, $new_url): string { } /** * Check if the dependency is cleared or not. * * @since 4.0.0 * * @param string $route Route. * * @return bool */ protected function is_dependency_resolved(string $route): bool { } /** * List forcefully resolved dependencies. * * @since 4.0.0 * * @return array */ public function list_force_dependency_resolved_alteration(): array { } /** * Get URL for the route. * * @since 4.0.0 * * @param string $route Route. * * @return string */ protected function get_url_for_route(string $route): string { } /** * Get template dependencies resolutions. * * @since 4.0.0 * * @return array */ protected function get_template_dependencies_resolutions(): array { } /** * Get overridden template part path. * * @since 4.0.0 * * @param string $slug Template slug. * @param string $name Template name. * @param array $args Arguments. * * @return false|string Returns the template file if found otherwise false. */ protected function get_overridden_template(string $slug, string $name = '', array $args = []) { } /** * List overridden templates. * * @since 4.0.0 * * @return array */ public function list_overridden_templates(): array { } /** * Display notice if templates are overridden. * * @since 4.0.0 * * @param array $notices Notices. * * @return array */ public function display_notice(array $notices): array { } /** * Add template dependencies to status page. * * @since 4.0.0 * * @return void * @throws Exception */ public function add_status_section(\WeDevs\Dokan\Admin\Status\Status $status) { } } } namespace WeDevs\Dokan\Walkers { class Category extends \Walker { public $tree_type = 'category'; public $db_fields = ['parent' => 'parent', 'id' => 'term_id']; //TODO: decouple this public function start_lvl(&$output, $depth = 0, $args = []) { } public function end_lvl(&$output, $depth = 0, $args = []) { } public function start_el(&$output, $category, $depth = 0, $args = [], $id = 0) { } public function end_el(&$output, $category, $depth = 0, $args = []) { } } /** * Category walker for generating dokan store category */ class StoreCategory extends \WeDevs\Dokan\Walkers\Category { public function __construct($seller_id) { } public function start_el(&$output, $category, $depth = 0, $args = [], $id = 0) { } } class TaxonomyDropdown extends \Walker { /** * @see Walker::$tree_type * * @var string */ public $tree_type = 'category'; /** * @see Walker::$db_fields * * @var array */ public $db_fields = ['parent' => 'parent', 'id' => 'term_id']; /** * Post id * * @var int */ private $post_id = ''; /** * Constructor method * * @param int $post_id */ public function __construct($post_id = 0) { } /** * Override display_element method to add additional validation * * @param object $element Data object. * @param array $children_elements List of elements to continue traversing. * @param int $max_depth Max depth to traverse. * @param int $depth Depth of current element. * @param array $args An array of arguments. * @param string $output Used to append additional content. */ public function display_element($element, &$children_elements, $max_depth, $depth, $args, &$output) { } /** * Start element * * @param string $output * @param object $category * @param int $depth * @param array $args * @param int $id * * @return void */ public function start_el(&$output, $category, $depth = 0, $args = [], $id = 0) { } } } namespace WeDevs\Dokan\Widgets { class BestSellingProducts extends \WP_Widget { /** * Constructor * * @return void **/ public function __construct() { } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form($instance) { } /** * Sanitize widget form values as they are saved. * * @see WP_Widget::update() * * @param array $new_instance Values just sent to be saved. * @param array $old_instance Previously saved values from database. * * @return array Updated safe values to be saved. */ public function update($new_instance, $old_instance) { } } class FilterByAttributes extends \WP_Widget { /** * Register widget with WordPress. */ public function __construct() { } /** * Front-end display of widget. * * @since 3.5.0 * * @param array $args Widget arguments. * @param array $instance Saved values from database. * * @see WP_Widget::widget() */ public function widget($args, $instance) { } /** * Back-end widget form. * * @since 3.5.0 * * @param array $instance Previously saved values from database. * * @see WP_Widget::form() */ public function form($instance) { } /** * Sanitize widget form values as they are saved. * * @since 3.5.0 * * @param array $new_instance Values just sent to be saved. * @param array $old_instance Previously saved values from database. * * @see WP_Widget::update() * * @see WP_Widget::update() * * @return array Updated safe values to be saved. */ public function update($new_instance, $old_instance) { } /** * Get this widget taxonomy. * * @since 3.5.0 * * @param array $instance Array of instance options. * * @return string */ protected function get_instance_taxonomy($instance) { } } class Manager { use \WeDevs\Dokan\Traits\ChainableContainer; /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } /** * Check if widget class exists * * @since 3.0.0 * * @param string $widget_id * * @return bool */ public function is_exists($widget_id) { } /** * Get widget id from widget class * * @since 3.0.0 * * @param string $widget_class * * @return bool|string Returns widget id if found, outherwise returns false */ public function get_id($widget_class) { } } class ProductCategoryMenu extends \WP_Widget { /** * Constructor * * @return void **/ public function __construct() { } /** * Outputs the HTML for this widget. * * @param array $args An array of standard parameters for widgets in this theme * @param array $instance An array of settings for this widget instance * @return void Echoes it's output **/ public function widget($args, $instance) { } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. * * @param array $new_instance An array of new settings as submitted by the admin * @param array $old_instance An array of the previous settings * @return array The validated and (if necessary) amended settings **/ public function update($new_instance, $old_instance) { } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @param array $instance array of the current settings for this widget * @return void Echoes it's output **/ public function form($instance) { } } class StoreCategoryMenu extends \WP_Widget { /** * Constructor * * @return void **/ public function __construct() { } /** * Outputs the HTML for this widget. * * @param array $args An array of standard parameters for widgets in this theme * @param array $instance An array of settings for this widget instance * @return void Echoes it's output **/ public function widget($args, $instance) { } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. * * @param array $new_instance An array of new settings as submitted by the admin * @param array $old_instance An array of the previous settings * @return array The validated and (if necessary) amended settings **/ public function update($new_instance, $old_instance) { } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @param array $instance An array of the current settings for this widget * @return void Echoes it's output **/ public function form($instance) { } } /** * Dokan Store Contact Seller Widget * * @since 1.0 * * @package dokan */ class StoreContactForm extends \WP_Widget { /** * Constructor * * @return void */ public function __construct() { } /** * Outputs the HTML for this widget. * * @param array $args An array of standard parameters for widgets in this theme * @param array $instance An array of settings for this widget instance * * @return void Echoes it's output **/ public function widget($args, $instance) { } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. * * @param array $new_instance An array of new settings as submitted by the admin * @param array $old_instance An array of the previous settings * * @return array The validated and (if necessary) amended settings */ public function update($new_instance, $old_instance) { } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @param array $instance An array of the current settings for this widget * * @return void Echoes it's output */ public function form($instance) { } } /** * Dokan Store Location Widget * * @since 1.0 * * @package dokan */ class StoreLocation extends \WP_Widget { /** * Constructor * * @return void */ public function __construct() { } /** * Outputs the HTML for this widget. * * @param array An array of standard parameters for widgets in this theme * @param array An array of settings for this widget instance * * @return void Echoes it's output */ public function widget($args, $instance) { } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. * * @param array $new_instance array of new settings as submitted by the admin * @param array $old_instance array of the previous settings * * @return array The validated and (if necessary) amended settings */ public function update($new_instance, $old_instance) { } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @param array $instance array of the current settings for this widget * * @return void Echoes it's output */ public function form($instance) { } } /** * Dokan Store Open Close Widget * * @since 2.7.3 * * @package dokan */ class StoreOpenClose extends \WP_Widget { /** * Constructor * * @return void */ public function __construct() { } /** * Outputs the HTML for this widget. * * @param array $args array of standard parameters for widgets in this theme * @param array $instance An array of settings for this widget instance * * @return void Echoes it's output **/ public function widget($args, $instance) { } /** * Deals with the settings when they are saved by the admin. Here is * where any validation should be dealt with. * * @param array $new_instance array of new settings as submitted by the admin * @param array $old_instance array of the previous settings * * @return array The validated and (if necessary) amended settings */ public function update($new_instance, $old_instance) { } /** * Displays the form for this widget on the Widgets page of the WP Admin area. * * @param array $instance array of the current settings for this widget * * @return void Echoes it's output */ public function form($instance) { } } class TopratedProducts extends \WP_Widget { /** * Register widget with WordPress. */ public function __construct() { } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form($instance) { } /** * Sanitize widget form values as they are saved. * * @see WP_Widget::update() * * @param array $new_instance Values just sent to be saved. * @param array $old_instance Previously saved values from database. * * @return array Updated safe values to be saved. */ public function update($new_instance, $old_instance) { } } } namespace WeDevs\Dokan\Withdraw\Export { class CSV { /** * Witdraws to export * * @var array */ protected $withdraws = []; /** * Class constructor * * @since 3.0.0 * * @param array $withdraws */ public function __construct($withdraws) { } /** * Export withdraws * * @since 3.0.0 * * @return void */ public function export() { } } class Manager { /** * Withdraws to export * * @var array */ protected $withdraws = []; /** * Class constructor * * @since 3.0.0 * * @param array $args */ public function __construct($args) { } /** * Export data in CSV * * @since 3.0.0 * * @return void */ public function csv() { } } } namespace WeDevs\Dokan\Withdraw { class Hooks { /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct() { } /** * Download Withdraw Log Export File. * * @since 3.8.3 * * @return void */ public function download_withdraw_log_export_file() { } /** * Dokan withdraw localize scripts. * * @since 4.0.0 * * @param array $localized_args * * @return array */ public function localize_withdraw_scripts($localized_args) { } /** * Dokan Custom Withdraw Method Title * * @since 3.3.7 * * @param string $title * @param string $method_key * @param Withdraw $request * * @return string */ public function dokan_withdraw_dokan_custom_method_title($title, $method_key, $request) { } /** * Update vendor balance after approve a request. * * @since 3.0.0 * * @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw * * @return void */ public function update_vendor_balance($withdraw) { } /** * Handle withdraw request ajax. * * @since 3.3.7 * * @return void */ public function ajax_handle_withdraw_request() { } /** * Handle default with method change. * * @since 3.3.7 * * @return void */ public function ajax_handle_make_default_method() { } } /** * Withdraw base class * * @since 2.4 * * @author wedDevs * * @package dokan */ class Manager { /** * Validate approval request * * @since 3.0.0 * * @param array $args * * @return bool|\WP_Error */ public function is_valid_approval_request($args) { } /** * Validate cancellation request * * @since 3.0.0 * * @param array $args * * @return bool|\WP_Error */ public function is_valid_cancellation_request($args) { } /** * Update withdraw status * * @since 2.4 * * @param int $id * @param int $user_id * @param string $status * * @return void */ public function update_status($id, $user_id, $status) { } /** * Insert an withdraw approval request * * @param array $data * * @return bool|\WP_Error */ public function insert_withdraw($args = []) { } /** * Check if a user has already pending withdraw request * * @param integer $user_id * * @return boolean */ public function has_pending_request($user_id) { } /** * Get withdraw request of a user * * @param integer $user_id * @param integer $status * @param integer $limit * @param integer $offset * * @return Withdraw[] */ public function get_withdraw_requests($user_id = '', $status = 0, $limit = 10, $offset = 0): array { } /** * Get status code by status type * * @param string * * @return integer */ public function get_status_code($status) { } /** * Get withdraw details by method and user * * @param string $method * @param int $user_id * * @return array */ public function get_formatted_details($method, $user_id) { } /** * Get withdraw status from code * * @since 3.0.0 * * @param int $code * * @return string */ public function get_status_name($code) { } /** * Get list of withdraws * * @since 3.0.0 * * @param array $args * * @return array|object */ public function all($args = []) { } /** * @since 3.2.0 * * @return int|null */ public function get_total_withdraw_count() { } /** * Get a single withdraw * * @since 3.0.0 * * @param 3.0.0 $id * * @return \WeDevs\Dokan\Withdraw\Withdraw|null */ public function get($id) { } /** * Create a withdraw request * * @since 3.0.0 * * @param array $args * * @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error */ public function create($args) { } /** * Check if a user has sufficient withdraw balance * * @param integer $user_id * * @return boolean */ public function has_withdraw_balance($user_id) { } /** * Get the system withdraw limit * * @return integer */ public function get_withdraw_limit() { } /** * Get a sellers balance * * @param integer $user_id * * @return integer */ public function get_user_balance($user_id) { } /** * Export withdraw data * * @since 3.0.0 * * @param array $args * * @return \WeDevs\Dokan\Withdraw\Export\Manager */ public function export($args) { } /** * Returns users withdraws summary. * * @since 3.7.10 * * @param int $user_id * * @return array */ public function get_user_withdraw_summary($user_id = '') { } } class Withdraw { /** * Witthdraw data * * @var array */ protected $data = []; /** * Class constructor * * @since 3.0.0 * * @return void */ public function __construct($data = []) { } /** * Get withdraw data * * @since 3.0.0 * * @return array */ public function get_withdraw() { } /** * Get withdraw id * * @since 3.0.0 * * @return int */ public function get_id() { } /** * Get user_id * * @since 3.0.0 * * @return int */ public function get_user_id() { } /** * Get amount * * @since 3.0.0 * * @return string */ public function get_amount() { } /** * Get date * * @since 3.0.0 * * @return string */ public function get_date() { } /** * Get status * * @since 3.0.0 * * @return string */ public function get_status() { } /** * Get ip * * @since 3.0.0 * * @return string */ public function get_method() { } /** * Get note * * @since 3.0.0 * * @return string */ public function get_note() { } /** * Get details * * @since 3.2.12 * * @return string */ public function get_details() { } /** * Get ip * * @since 3.0.0 * * @return string */ public function get_ip() { } /** * Get withdraw charge * * @since 3.9.6 * * @returns int|float */ public function get_charge() { } /** * Get withdraw revivable amount after deducting the charge amount. * * @since 3.9.6 * * @returns int|float */ public function get_receivable_amount() { } /** * Get withdraw charge information. * * @since 3.9.6 * * @returns array */ public function get_charge_data() { } /** * Set user_id * * @since 3.0.0 * * @param int $user_id * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_user_id($user_id) { } /** * Set amount * * @since 3.0.0 * * @param string $amount * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_amount($amount) { } /** * Set date * * @since 3.0.0 * * @param string $date * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_date($date) { } /** * Set status * * @since 3.0.0 * * @param string $status * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_status($status) { } /** * Set method * * @since 3.0.0 * * @param string $method * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_method($method) { } /** * Set note * * @since 3.0.0 * * @param string $note * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_note($note) { } /** * Set details * * @since 3.2.12 * * @param string $details * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_details($details) { } /** * Set ip * * @since 3.0.0 * * @param string $ip * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_ip($ip) { } /** * Sets charge. * * @since 3.9.6 * * @param $amount * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_charge($amount) { } /** * Set receivable amount * * @since 3.9.6 * * @param $receivable * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_recivable($receivable) { } /** * Sets charge data. * * @since 3.9.6 * * @param $charge_data array * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function set_charge_data($charge_data) { } /** * Calculate withdraw charge * * @since 3.9.6 * * @return \WeDevs\Dokan\Withdraw\Withdraw */ public function calculate_charge() { } /** * Returns withdraw data. * * @since 3.9.6 * * @return array */ public function get_data(): array { } /** * Create or update a withdraw * * @since 3.0.0 * * @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error */ public function save() { } /** * Create or add a withdraw request * * @since 3.0.0 * * @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error */ protected function create() { } /** * Update a withdraw * * @since 3.0.0 * * @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error */ protected function update() { } /** * Delete a withdraw * * @since 3.0.0 * * @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error */ public function delete() { } } /** * Withdraw Cache class. * * Manage all of the caches for vendor and admin withdrawal functionalities. * * @since 3.3.2 * * @see \WeDevs\Dokan\Cache */ class WithdrawCache { public function __construct() { } /** * Clear Withdraw Cache Group for Seller. * * @since 3.3.2 * * @param int $seller_id * * @return void */ public static function delete($seller_id) { } /** * Clear Cache After Seller Withdraw request. * * @since 3.3.2 * * @param int $seller_id * @param float $amount * @param string $method * * @return void */ public function withdraw_request_created($seller_id, $amount, $method) { } /** * Delete seller balance cache after a withdraw status is update. * * @since 3.3.2 * * @param string $status * @param int $seller_id * @param int $id * * @return void */ public function withdraw_status_updated($status, $seller_id, $id) { } /** * Handle cache on Approve/Reject withdraw request. * * @since 3.3.2 * * @param Withdraw $withdraw * * @return void */ public function invalidate_withdraw_cache($withdraw) { } } class Withdraws { /** * Query arguments * * @var array */ protected $args = []; /** * Withdraw results * * @var array */ protected $withdraws = []; /** * Total withdraw found * * @var int */ protected $total = 0; /** * Maximum number of pages * * @var null|int */ protected $max_num_pages = null; /** * Status counts. * * @since 3.8.3 * * @var array $status */ protected $status = []; /** * Class constructor * * @since 3.0.0 * * @param array $args * * @return void */ public function __construct($args = []) { } /** * Get withdraws * * @since 3.0.0 * * @return array */ public function get_withdraws() { } /** * Query withdraws * * @since 3.0.0 * * @return \WeDevs\Dokan\Withdraw\Withdraws */ public function query() { } /** * Get withdraw status count. * * @since 3.8.3 * * @return array */ public function get_status_count() { } /** * Get total number of withdraws * * @since 3.0.0 * * @return int */ public function get_total() { } /** * Get maximum number of pages * * @since 3.0.0 * * @return int */ public function get_maximum_num_pages() { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument { interface ArgumentInterface { /** * @return mixed */ public function getValue(); } interface DefaultValueInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentInterface { /** * @return mixed */ public function getDefaultValue(); } interface ResolvableArgumentInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentInterface { public function getValue(): string; } class ResolvableArgument implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ResolvableArgumentInterface { protected $value; public function __construct(string $value) { } public function getValue(): string { } } class DefaultValueArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ResolvableArgument implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\DefaultValueInterface { protected $defaultValue; public function __construct(string $value, $defaultValue = null) { } /** * @return mixed|null */ public function getDefaultValue() { } } interface LiteralArgumentInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentInterface { } class LiteralArgument implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgumentInterface { public const TYPE_ARRAY = 'array'; public const TYPE_BOOL = 'boolean'; public const TYPE_BOOLEAN = 'boolean'; public const TYPE_CALLABLE = 'callable'; public const TYPE_DOUBLE = 'double'; public const TYPE_FLOAT = 'double'; public const TYPE_INT = 'integer'; public const TYPE_INTEGER = 'integer'; public const TYPE_OBJECT = 'object'; public const TYPE_STRING = 'string'; /** * @var mixed */ protected $value; public function __construct($value, ?string $type = null) { } /** * {@inheritdoc} */ public function getValue() { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\Literal { class ArrayArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(array $value) { } } class BooleanArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(bool $value) { } } class CallableArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(callable $value) { } } class FloatArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(float $value) { } } class IntegerArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(int $value) { } } class ObjectArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(object $value) { } } class StringArgument extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\LiteralArgument { public function __construct(string $value) { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition { interface DefinitionAggregateInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface, \IteratorAggregate { public function add(string $id, $definition): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function addShared(string $id, $definition): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function getDefinition(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface; public function has(string $id): bool; public function hasTag(string $tag): bool; public function resolve(string $id); public function resolveNew(string $id); public function resolveTagged(string $tag): array; public function resolveTaggedNew(string $tag): array; } class DefinitionAggregate implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionAggregateInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var DefinitionInterface[] */ protected $definitions = []; public function __construct(array $definitions = []) { } public function add(string $id, $definition): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function addShared(string $id, $definition): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function has(string $id): bool { } public function hasTag(string $tag): bool { } public function getDefinition(string $id): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Definition\DefinitionInterface { } public function resolve(string $id) { } public function resolveNew(string $id) { } public function resolveTagged(string $tag): array { } public function resolveTaggedNew(string $tag): array { } public function getIterator(): \Generator { } } } namespace WeDevs\Dokan\ThirdParty\Packages\Psr\Container { /** * Base interface representing a generic exception in a container. */ interface ContainerExceptionInterface extends \Throwable { } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Exception { class ContainerException extends \RuntimeException implements \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerExceptionInterface { } } namespace WeDevs\Dokan\ThirdParty\Packages\Psr\Container { /** * No entry was found in the container. */ interface NotFoundExceptionInterface extends \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerExceptionInterface { } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Exception { class NotFoundException extends \InvalidArgumentException implements \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\NotFoundExceptionInterface { } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector { interface InflectorInterface { public function getType(): string; public function inflect(object $object): void; public function invokeMethod(string $name, array $args): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface; public function invokeMethods(array $methods): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface; public function setProperties(array $properties): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface; public function setProperty(string $property, $value): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface; } class Inflector implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverInterface, \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverTrait; use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var string */ protected $type; /** * @var callable|null */ protected $callback; /** * @var array */ protected $methods = []; /** * @var array */ protected $properties = []; public function __construct(string $type, ?callable $callback = null) { } public function getType(): string { } public function invokeMethod(string $name, array $args): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { } public function invokeMethods(array $methods): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { } public function setProperty(string $property, $value): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { } public function setProperties(array $properties): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorInterface { } public function inflect(object $object): void { } } interface InflectorAggregateInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface, \IteratorAggregate { public function add(string $type, ?callable $callback = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\Inflector; public function inflect(object $object); } class InflectorAggregate implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\InflectorAggregateInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var Inflector[] */ protected $inflectors = []; public function add(string $type, ?callable $callback = null): \WeDevs\Dokan\ThirdParty\Packages\League\Container\Inflector\Inflector { } public function inflect($object) { } public function getIterator(): \Generator { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container { class ReflectionContainer implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverInterface, \WeDevs\Dokan\ThirdParty\Packages\Psr\Container\ContainerInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\Argument\ArgumentResolverTrait; use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var boolean */ protected $cacheResolutions; /** * @var array */ protected $cache = []; public function __construct(bool $cacheResolutions = false) { } public function get($id, array $args = []) { } public function has($id): bool { } public function call(callable $callable, array $args = []) { } } } namespace WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider { interface ServiceProviderAggregateInterface extends \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareInterface, \IteratorAggregate { public function add(\WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface $provider): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderAggregateInterface; public function provides(string $id): bool; public function register(string $service): void; } class ServiceProviderAggregate implements \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderAggregateInterface { use \WeDevs\Dokan\ThirdParty\Packages\League\Container\ContainerAwareTrait; /** * @var ServiceProviderInterface[] */ protected $providers = []; /** * @var array */ protected $registered = []; public function add(\WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderInterface $provider): \WeDevs\Dokan\ThirdParty\Packages\League\Container\ServiceProvider\ServiceProviderAggregateInterface { } public function provides(string $service): bool { } public function getIterator(): \Generator { } public function register(string $service): void { } } } namespace { class WeDevs_Promotion extends \WeDevs\Dokan\Admin\Promotion { } /** * Dokan Uninstall * * Uninstalling Dokan deletes user roles, tables, pages, meta data and options. * * @since 3.2.15 * * @package Dokan\Uninstaller */ class Dokan_Uninstaller { /** * Constructor for the class Dokan_Uninstaller * * @since 3.2.15 */ public function __construct() { } /** * Return a list of Dokan capabilities * * @since 3.2.15 * * @return string[] */ private function get_dokan_capabilities() { } /** * Remove Dokan roles. * * @since 3.2.15 * * @return void */ private function remove_roles() { } /** * Return a list of tables. Used to make sure all Dokan tables are dropped * when uninstalling the plugin * * @since 3.2.15 * * @return array Dokan tables. */ private function get_tables() { } /** * Drop all tables created by Dokan Lite and Pro * * @since 3.2.15 * * @return void */ private function drop_tables() { } /** * Change Dokan Vendor to WooCommerce Customer * * @since 3.2.15 * * @return void */ private function change_vendor_role_to_customer() { } /** * Delete Dokan and Dokan Pro related user metas * * @since 3.7.12 * * @return void */ private function delete_usermeta() { } } } namespace Appsero { /** * Appsero Client * * This class is necessary to set project data */ class Client { /** * The client version * * @var string */ public $version = '2.0.4'; /** * Hash identifier of the plugin * * @var string */ public $hash; /** * Name of the plugin * * @var string */ public $name; /** * The plugin/theme file path * * @example .../wp-content/plugins/test-slug/test-slug.php * * @var string */ public $file; /** * Main plugin file * * @example test-slug/test-slug.php * * @var string */ public $basename; /** * Slug of the plugin * * @example test-slug * * @var string */ public $slug; /** * The project version * * @var string */ public $project_version; /** * The project type * * @var string */ public $type; /** * Textdomain * * @var string */ public $textdomain; /** * The Object of Insights Class * * @var object */ private $insights; /** * The Object of License Class * * @var object */ private $license; /** * Initialize the class * * @param string $hash hash of the plugin * @param string $name readable name of the plugin * @param string $file main plugin file path */ public function __construct($hash, $name, $file) { } /** * Initialize insights class * * @return Appsero\Insights */ public function insights() { } /** * Initialize plugin/theme updater * * @return void */ public function updater() { } /** * Initialize license checker * * @return Appsero\License */ public function license() { } /** * API Endpoint * * @return string */ public function endpoint() { } /** * Set project basename, slug and version * * @return void */ protected function set_basename_and_slug() { } /** * Send request to remote endpoint * * @param array $params * @param string $route * * @return array|WP_Error array of results including HTTP headers or WP_Error if the request failed */ public function send_request($params, $route, $blocking = false) { } /** * Check if the current server is localhost * * @return bool */ public function is_local_server() { } /** * Translate function _e() */ // phpcs:ignore public function _etrans($text) { } /** * Translate function __() */ // phpcs:ignore public function __trans($text) { } /** * Set project textdomain */ public function set_textdomain($textdomain) { } } /** * Appsero Insights * * This is a tracker class to track plugin usage based on if the customer has opted in. * No personal information is being tracked by this class, only general settings, active plugins, environment details * and admin email. */ class Insights { /** * The notice text * * @var string */ public $notice; /** * Whether to show the notice or not * * @var bool */ protected $show_notice = true; /** * If extra data needs to be sent * * @var array */ protected $extra_data = array(); /** * AppSero\Client * * @var object */ protected $client; /** * Whether to include plugin data * * @var bool */ private $plugin_data = false; /** * Initialize the class * * @param mixed $client Client object or string. * @param string $name Name of the plugin/theme. * @param string $file Main plugin file path. */ public function __construct($client, $name = null, $file = null) { } /** * Don't show the notice * * @return self */ public function hide_notice() { } /** * Add plugin data if needed * * @return self */ public function add_plugin_data() { } /** * Add extra data if needed * * @param array $data Extra data. * * @return self */ public function add_extra($data = array()) { } /** * Set custom notice text * * @param string $text Custom notice text. * * @return self */ public function notice($text = '') { } /** * Initialize insights * * @return void */ public function init() { } /** * Initialize theme hooks * * @return void */ public function init_theme() { } /** * Initialize plugin hooks * * @return void */ public function init_plugin() { } /** * Initialize common hooks * * @return void */ protected function init_common() { } /** * Send tracking data to AppSero server * * @param bool $override Whether to override the tracking allowed check. * * @return void */ public function send_tracking_data($override = false) { } /** * Get the tracking data points * * @return array */ protected function get_tracking_data() { } /** * If a child class wants to send extra data * * @return mixed */ protected function get_extra_data() { } /** * Explain the user which data we collect * * @return array */ protected function data_we_collect() { } /** * Check if the user has opted into tracking * * @return bool */ public function tracking_allowed() { } /** * Get the last time a tracking was sent * * @return false|string */ private function get_last_send() { } /** * Check if the notice has been dismissed or enabled * * @return bool */ public function notice_dismissed() { } /** * Check if the current server is localhost * * @return bool */ private function is_local_server() { } /** * Schedule the event weekly * * @return void */ private function schedule_event() { } /** * Clear any scheduled hook * * @return void */ private function clear_schedule_event() { } /** * Display the admin notice to users that have not opted-in or out * * @return void */ public function admin_notice() { } /** * Handle the optin/optout * * @return void */ public function handle_optin_optout() { } /** * Validate the request nonce. * * @return bool */ private function is_valid_request() { } /** * Check if the current user has manage options capability. * * @return bool */ private function has_manage_options_capability() { } /** * Check if the current request is for opt-in. * * @return bool */ private function is_optin_request() { } /** * Check if the current request is for opt-out. * * @return bool */ private function is_optout_request() { } /** * Handle redirection after opt-in/opt-out actions. * * @param string $param The query parameter to remove. */ private function handle_redirection($param) { } /** * Check if the current page is updater.php or similar inaccessible pages. * * @return bool */ private function is_inaccessible_page() { } /** * Tracking optin * * @return void */ public function optin() { } /** * Optout from tracking * * @return void */ public function optout() { } /** * Get the number of post counts * * @param string $post_type The post type to count. * @return int */ public function get_post_count($post_type) { } /** * Get server related info. * * @return array */ private static function get_server_info() { } /** * Get WordPress related data. * * @return array */ private function get_wp_info() { } /** * Get the list of active and inactive plugins * * @return array */ private function get_all_plugins() { } /** * Get user totals based on user role. * * @return array */ public function get_user_counts() { } /** * Add weekly cron schedule * * @param array $schedules Existing cron schedules. * @return array */ public function add_weekly_schedule($schedules) { } /** * Plugin activation hook * * @return void */ public function activate_plugin() { } /** * Clear our options upon deactivation * * @return void */ public function deactivation_cleanup() { } /** * Hook into action links and modify the deactivate link * * @param array $links * * @return array */ public function plugin_action_links($links) { } /** * Plugin uninstall reasons * * @return array */ private function get_uninstall_reasons() { } /** * Plugin deactivation uninstall reason submission * * @return void */ public function uninstall_reason_submission() { } /** * Handle the plugin deactivation feedback * * @return void */ public function deactivate_scripts() { } /** * Run after theme deactivated * * @param string $new_name * @param object $new_theme * @param object $old_theme * * @return void */ public function theme_deactivated($new_name, $new_theme, $old_theme) { } /** * Get user IP Address */ private function get_user_ip_address() { } /** * Get site name */ private function get_site_name() { } /** * Send request to appsero if user skip to send tracking data */ private function send_tracking_skipped_request() { } /** * Deactivation modal styles */ private function deactivation_modal_styles() { } } /** * Appsero License Checker * * This class will check, active and deactive license */ class License { /** * AppSero\Client * * @var object */ protected $client; /** * Arguments of create menu * * @var array */ protected $menu_args; /** * `option_name` of `wp_options` table * * @var string */ protected $option_key; /** * Error message of HTTP request * * @var string */ public $error; /** * Success message on form submit * * @var string */ public $success; /** * Corn schedule hook name * * @var string */ protected $schedule_hook; /** * Set value for valid license * * @var bool */ private $is_valid_license = null; /** * Initialize the class * * @param Client $client */ public function __construct(\Appsero\Client $client) { } /** * Set the license option key. * * If someone wants to override the default generated key. * * @param string $key * * @since 1.3.0 * * @return License */ public function set_option_key($key) { } /** * Get the license key * * @since 1.3.0 * * @return string|null */ public function get_license() { } /** * Check license * * @return array */ public function check($license_key) { } /** * Active a license * * @return array */ public function activate($license_key) { } /** * Deactivate a license * * @return array */ public function deactivate($license_key) { } /** * Send common request * * @return array */ protected function send_request($license_key, $route) { } /** * License Refresh Endpoint */ public function refresh_license_api() { } /** * Add settings page for license * * @param array $args * * @return void */ public function add_settings_page($args = []) { } /** * Admin Menu hook * * @return void */ public function admin_menu() { } /** * License menu output */ public function menu_output() { } /** * License form submit */ public function license_form_submit($form_data = array()) { } /** * Check license status on schedule */ public function check_license_status() { } /** * Check this is a valid license */ public function is_valid() { } /** * Check this is a valid license */ public function is_valid_by($option, $value) { } /** * Styles for licenses page */ private function licenses_style() { } /** * Show active license information */ private function show_active_license_info($license) { } /** * Show license settings page notices */ private function show_license_page_notices() { } /** * Card header */ private function show_license_page_card_header($license) { } /** * Active client license */ private function active_client_license($license_key) { } /** * Deactive client license */ private function deactive_client_license() { } /** * Refresh Client License */ private function refresh_client_license() { } /** * Add license menu page */ private function create_menu_page() { } /** * Add submenu page */ private function create_submenu_page() { } /** * Add submenu page */ private function create_options_page() { } /** * Schedule daily sicense checker event */ public function schedule_cron_event() { } /** * Clear any scheduled hook */ public function clear_scheduler() { } /** * Enable/Disable schedule */ private function run_schedule() { } /** * Get input license key * * @return $license */ private function get_input_license_value($action, $license) { } } /** * Appsero Updater * * This class will show new updates for the project */ class Updater { /** * Appsero\Client * * @var object */ protected $client; /** * Object of Updater * * @var object */ protected static $instance; /** * Cache key * * @var string */ protected $cache_key; /** * Initialize the class * * @param object $client */ public function __construct($client) { } /** * Initialize the Updater * * @param object $client * @return object */ public static function init($client) { } /** * Set up WordPress filter hooks to get plugin updates * * @return void */ public function run_plugin_hooks() { } /** * Set up WordPress filter hooks to get theme updates * * @return void */ public function run_theme_hooks() { } /** * Initialize the admin-only hooks * * @return void */ public function admin_init() { } /** * Check for plugin updates * * @param stdClass|bool $transient_data * @return stdClass */ public function check_plugin_update($transient_data) { } /** * Get cached version info from the database * * @return object|bool */ private function get_cached_version_info() { } /** * Set version info to the database * * @param object $value * @return void */ private function set_cached_version_info($value) { } /** * Get project latest version info from Appsero * * @return object|bool */ private function get_project_latest_version() { } /** * Update information on the "View version x.x details" page with custom data * * @param mixed $data * @param string $action * @param object $args * @return object */ public function plugins_api_filter($data, $action = '', $args = null) { } /** * Check for theme updates * * @param object $transient_data * @return object */ public function check_theme_update($transient_data) { } /** * Get version information * * @return object|bool */ private function get_version_info() { } /** * Check required plugins * * @param array $required_plugins * @return array */ private function check_required_plugins($required_plugins = []) { } /** * Get plugin file from slug * * @param string $plugin_slug * @param array $installed_plugins * @return string|null */ private function get_plugin_file($plugin_slug, $installed_plugins) { } /** * Show warning notice for required plugins * * @return void */ protected function show_warning_notice() { } /** * Add custom plugin row with warnings * * @param string $plugin_file * @param array $plugin_data * @param string $status * @param array $warnings * @return void */ public function add_custom_plugin_row($plugin_file, $plugin_data, $status, $warnings) { } public function validate_plugin_update_url($reply, $package) { } } } namespace Appsero\Tests\Stub { /** * Minimal stand-in for \Appsero\Client. * * Updater only reads these public properties and calls license(), * send_request() and __trans(). */ class ClientStub { public $slug = 'happy-elementor-addons-pro'; public $name = 'Happy Elementor Addons Pro'; public $type = 'plugin'; public $basename = 'happy-elementor-addons-pro/happy-elementor-addons-pro.php'; public $project_version = '1.0.0'; public $hash = 'test-hash'; /** * Value returned by send_request(). Tests overwrite this. * * @var mixed */ public $request_response = null; /** * Number of times send_request() has been called. * * Lets tests assert that no remote HTTP call was made. * * @var int */ public $send_request_calls = 0; public function license() { } public function send_request($params, $route, $blocking = false) { } public function __trans($text) { } } } namespace Appsero\Tests { class UpdaterTest extends \PHPUnit\Framework\TestCase { /** * @var ClientStub */ private $client; protected function setUp(): void { } protected function tearDown(): void { } /** * Build the version-info object that Updater caches in a transient. * * @param string $new_version * @return object */ private function version_info(string $new_version) { } /** * The bug: these filters were only registered inside admin_init, so they did * not exist during the WP-Cron request that drives auto-updates, leaving the * plugin out of the update_plugins transient and blanking its Automatic * Updates column. * * @see https://github.com/getdokan/client-issue/issues/492 */ public function test_plugin_update_transient_filter_is_registered_on_every_request(): void { } public function test_plugins_api_filter_is_registered_on_every_request(): void { } public function test_admin_only_ui_is_still_deferred_to_admin_init(): void { } public function test_theme_client_does_not_register_plugin_filters(): void { } public function test_check_plugin_update_adds_plugin_to_response_when_newer_version_exists(): void { } /** * no_update matters as much as response: WP_Plugins_List_Table sets * 'update-supported' => true from EITHER bucket, and without it the * Automatic Updates column renders as unavailable. */ public function test_check_plugin_update_adds_plugin_to_no_update_when_already_current(): void { } public function test_check_plugin_update_tolerates_non_object_transient(): void { } /** * AppSero only includes `package` in the version-info payload when the * license resolves to ACTIVE (appsero-api ReleaseResponseService); `new_version` * is returned regardless. Making cron work (this branch) means a package-less * entry now reaches WP_Automatic_Updater, which has no package guard (unlike * the admin UI, which does). Without `disable_autoupdate`, should_update() * returns true and WordPress emails the admin a failed-auto-update notice on * every cron run, forever. The entry must still land in `response` so the * update row and license-renewal prompt keep rendering. */ public function test_check_plugin_update_sets_disable_autoupdate_when_package_is_missing(): void { } /** * The converse: a licensed site (package present) must keep auto-updating * exactly as before. Guards against over-applying the flag. */ public function test_check_plugin_update_does_not_set_disable_autoupdate_when_package_is_present(): void { } /** * disable_autoupdate is only meaningful on a response entry, so it must not * be set when the entry lands in no_update. */ public function test_check_plugin_update_does_not_set_disable_autoupdate_when_entry_is_no_update(): void { } } } namespace { // autoload_real.php @generated by Composer class ComposerAutoloaderInit6be158b6a5cc2161316d5e1659af025b { private static $loader; public static function loadClassLoader($class) { } /** * @return \Composer\Autoload\ClassLoader */ public static function getLoader() { } } } namespace Composer\Autoload { class ComposerStaticInit6be158b6a5cc2161316d5e1659af025b { public static $files = array('b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php', '0ea370e600bbac1ed14210d26fb957e5' => __DIR__ . '/../..' . '/includes/functions-rest-api.php', '5002a4b4787d157353289afe21b0d460' => __DIR__ . '/../..' . '/includes/functions-dashboard-navigation.php'); public static $prefixLengthsPsr4 = array('W' => array('WeDevs\Dokan\ThirdParty\Packages\\' => 33, 'WeDevs\Dokan\\' => 13), 'A' => array('Appsero\\' => 8)); public static $prefixDirsPsr4 = array('WeDevs\Dokan\ThirdParty\Packages\\' => array(0 => __DIR__ . '/../..' . '/lib/packages'), 'WeDevs\Dokan\\' => array(0 => __DIR__ . '/../..' . '/includes'), 'Appsero\\' => array(0 => __DIR__ . '/..' . '/appsero/updater/src', 1 => __DIR__ . '/..' . '/appsero/client/src')); public static $classMap = array('Composer\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php'); public static function getInitializer(\Composer\Autoload\ClassLoader $loader) { } } } namespace { class HttpBuildUrlTest extends \PHPUnit_Framework_TestCase { private $full_url = "http://user:pass@www.example.com:8080/pub/index.php?a=b#files"; /** * Test example one. * * @see http://us2.php.net/manual/en/function.http-build-url.php */ public function testExampleOne() { } public function trailingSlashProvider() { } /** * @dataProvider trailingSlashProvider */ public function testTrailingSlash($expected, $config) { } public function testUrlQueryArrayIsIgnored() { } public function testPartsQueryArrayIsIgnored() { } public function testAcceptStrings() { } public function testAcceptArrays() { } public function testDefaults() { } public function testNewUrl() { } /** * @dataProvider queryProvider */ public function testJoinQuery($query, $expected) { } /** * @dataProvider pathProvider */ public function testJoinPath($path, $expected) { } public function testJoinPathTwo() { } /** * @dataProvider bitmaskProvider */ public function testBitmasks($constant, $expected) { } public function pathProvider() { } public function queryProvider() { } public function bitmaskProvider() { } } } namespace { /** * Get the container. * * @since 3.13.0 * * @return Container The global container instance. */ function dokan_get_container(): \WeDevs\Dokan\DependencyManagement\Container { } /** * Load Dokan Plugin when all plugins loaded. * * @return WeDevs_Dokan The singleton instance of WeDevs_Dokan. */ function dokan() { } /** * Get help documents for admin * * @since 2.8 * * @return Object */ function dokan_admin_get_help() { } /** * Dokan Get Admin report data * * @since 2.8.0 * * @param string $group_by * @param string $year * @param string $start * @param string $end * @param int $seller_id * * @return array */ function dokan_admin_report_data($group_by = 'day', $year = '', $start = '', $end = '', $seller_id = 0) { } /** * Generate report in admin area * * @param string $group_by * @param string $year * @param string $start * @param string $end * * @deprecated 3.8.0 since we are getting the report data from REST API (dokan/v1/report), we don't need this function anymore. * * @return array */ function dokan_admin_report($group_by = 'day', $year = '', $start = '', $end = '') { } /** * Generate Earning report By seller in admin area * * @param int $chosen_seller_id * * @global object $wp_locale * * @global WPDB $wpdb * @deprecated 3.8.0 since we are getting the report data from REST API (dokan/v1/report), we don't need this function anymore. * * @return array */ function dokan_admin_report_by_seller($chosen_seller_id = 0) { } /** * Dokan get seller amount from order total * * @param int $order_id * * @deprecated 3.8.0 * * @return float|array|WP_Error */ function dokan_get_seller_amount_from_order($order_id, $get_array = \false) { } /** * Get all the orders from a specific seller * * @since 3.6.3 Rewritten whole method * * @param int $seller_id * @param array $args * * @deprecated 3.8.0 since this is an alias only. * * @return WP_Error|int[]|WC_Order[] */ function dokan_get_seller_orders($seller_id, $args) { } /** * Get all the orders from a specific date range * * @param string $start_date * @param string $end_date * @param int|false $seller_id * @param string $status * * @deprecated 3.8.0 * * @return WP_Error|WC_Order[] */ function dokan_get_seller_orders_by_date($start_date, $end_date, $seller_id = \false, $status = 'all') { } /** * Get the orders total from a specific seller * * @param array $args * * @deprecated 3.8.0 * * @return int */ function dokan_get_seller_orders_number($args = []) { } /** * Get seller withdraw by date range * * @param string $start_date * @param string $end_date * @param int|false $seller_id * * @return object */ function dokan_get_seller_withdraw_by_date($start_date, $end_date, $seller_id = \false) { } /** * Check if order is belonged to given seller * * @param int $seller_id * @param int $order_id * * @return bool */ function dokan_is_seller_has_order($seller_id, $order_id) { } /** * Count orders for a seller * * @since 3.8.0 moved the functionality of this function to Order Manager class * * @param int $seller_id * * @return array */ function dokan_count_orders($seller_id) { } /** * Delete an order row from sync table when an order is deleted from WooCommerce * * @param int $order_id * * @deprecated 3.8.0 * * @return void */ function dokan_delete_sync_order($order_id) { } /** * Delete an order row from sync table to not insert duplicate * * @since 2.4.11 * * @param int $order_id * @param int $seller_id * * @deprecated 3.8.0 * * @return void */ function dokan_delete_sync_duplicate_order($order_id, $seller_id) { } /** * Insert an order in sync table once an order is created * * @param int $order_id * * @return void */ function dokan_sync_insert_order($order_id) { } /** * Get a seller ID based on WooCommerce order. * * If Order has suborder, this method will return 0 * * @since 3.2.11 rewritten entire function * * @param int|WC_Abstract_Order $order * * @return int | 0 on failure */ function dokan_get_seller_id_by_order($order) { } /** * Get bootstrap label class based on order status * * @param string $status * * @return string */ function dokan_get_order_status_class($status) { } /** * Get translated string of order status * * @param string $status * * @return string */ function dokan_get_order_status_translated($status) { } /** * Get product items list from order seperated by given glue * * @since 1.4 * * @param WC_Order $order * @param string $glue * * @return string list of products */ function dokan_get_product_list_by_order($order, $glue = ',') { } /** * Get if an order is a sub order or not * * @since 2.4.11 * * @param int|WC_Abstract_Order $order * * @return boolean */ function dokan_is_sub_order($order) { } /** * Get total number of orders in Dokan order table * * @since 2.4.3 * * @deprecated 3.8.0 * * @return int Order_count */ function dokan_total_orders() { } /** * Return array of sellers with items * * @since 2.4.4 * @since 2.9.11 Param can be an instance of WC_Order * * @param WC_Order|int $order * * @return array $sellers_with_items */ function dokan_get_sellers_by($order) { } /** * Return unique array of seller_ids from an order * * @since 2.4.9 * * @param int $order_id * * @return array $seller_ids */ function dokan_get_seller_ids_by($order_id) { } /** * Get suborder ids by parent order id * * @param int $parent_order_id * * @return int[]|null */ function dokan_get_suborder_ids_by($parent_order_id) { } /** * Return admin commission from an order * * @since 2.4.12 * * @param WC_Order $order * @param string $context accepted values are seller and admin * * @deprecated 2.9.21 * * @return float */ function dokan_get_admin_commission_by($order, $context) { } /** * Get Customer Order IDs by Seller * * @since 2.6.6 * * @param int $customer_id * @param int $seller_id * * @deprecated 3.8.0 * * @return array|null on failure */ function dokan_get_customer_orders_by_seller($customer_id, $seller_id) { } /** * Header rows for CSV order export * * @since 2.8.6 * * @return array */ function dokan_order_csv_headers() { } /** * Export orders to a CSV file * * @since 2.8.6 * * @param array $orders * @param string $file A file name to write to * * @return void */ function dokan_order_csv_export($orders, $file = \null) { } /** * Dokan get seller id by order id * * @param int $order_id * * @deprecated 3.8.0 * * @return int */ function dokan_get_seller_id_by_order_id($order_id) { } /** * Check if an order with same id is exists in database * * @param int $order_id * * @deprecated 3.8.0 * * @return boolean */ function dokan_is_order_already_exists($order_id) { } /** * Customer has order from current seller * * @since 2.8.6 * @since 3.8.0 moved this function from includes/functions.php * * @param int $customer_id * @param int|null $seller_id * * @return bool */ function dokan_customer_has_order_from_this_seller($customer_id, $seller_id = \null) { } /** * Get total sales amount of a seller * * @since 3.8.0 moved from includes/functions.php * * @param int $seller_id * * @return float */ function dokan_author_total_sales($seller_id) { } /** * Get Seller's net Earnings from a order * * @since 2.5.2 * @since 3.8.0 moved from includes/functions.php * * @param WC_ORDER $order * @param int $seller_id * * @deprecated 3.8.0 * * @return int $earned */ function dokan_get_seller_earnings_by_order($order, $seller_id) { } /** * Dokan get vendor order details by order ID * * @since 3.2.11 rewritten entire function * @since 3.8.0 Moved this function from includes/functions.php * * @param int $order_id * @param int|null $vendor_id will remove this parameter in future * * @return array will return empty array in case order has suborders */ function dokan_get_vendor_order_details($order_id, $vendor_id = \null) { } /** * Updates bulk orders status by orders ids. * * @since 3.7.10 * @since 3.8.0 Moved this method from includes/functions.php file * * @param array $postdata * * @return void */ function dokan_apply_bulk_order_status_change($postdata) { } /** * Dokan insert new product * * @since 2.5.1 * * @param array $args * * @return int|bool|WP_Error */ function dokan_save_product($args) { } /** * Show options for the variable product type. * * @since 2.5.3 * * @return void */ function dokan_product_output_variations() { } /** * Get product visibility options. * * @since 3.0.0 * * @return array */ function dokan_get_product_visibility_options() { } /** * Search product data for a term and users ids and return only ids. * * @param string $term * @param string $user_ids * @param string $type of product * @param bool $include_variations in search or not * * @return array of ids */ function dokan_search_seller_products($term, $user_ids = \false, $type = '', $include_variations = \false) { } /** * Callback for array filter to get products the user can edit only. * * @since 2.6.8 * * @param WC_Product $product * * @return bool */ function dokan_products_array_filter_editable($product) { } /** * Get row action for product * * @since 2.7.3 * @since 3.7.11 Added `$format_html` as an optional parameter * * @param object|int|string $post * @param bool $format_html (Optional) * * @return array */ function dokan_product_get_row_action($post, $format_html = \true) { } /** * Dokan get vendor by product * * @param int|WC_Product $product Product ID or Product Object * @param bool $get_vendor return true to get vendor id, otherwise it will return \WeDevs\Dokan\Vendor\Vendor object * * @since 2.9.8 * @since 3.2.16 added $id parameter * * @return int|\WeDevs\Dokan\Vendor\Vendor|false on failure */ function dokan_get_vendor_by_product($product, $get_vendor_id = \false) { } /** * Get translated product stock status * * @since 3.0.0 * * @param mix $stock * * @return string | array if stock parameter is not provided */ function dokan_get_translated_product_stock_status($stock = \false) { } /** * Get dokan store products filter catalog orderby * * @since 3.2.7 * * @return array */ function dokan_store_product_catalog_orderby() { } /** * Get default withdraw methods for vendor * * @since 1.0.0 * * @return array */ function dokan_withdraw_register_methods() { } /** * Get registered withdraw methods suitable for Settings Api * * @return array */ function dokan_withdraw_get_methods() { } /** * Get active withdraw methods.( Default is paypal ) * * @since 3.7.10 To filter out all the active payment methods only. * * @return array */ function dokan_withdraw_get_active_methods() { } /** * Get active withdraw methods for seller. * * @since 3.0.0 add $vendor_id param * * @param int $vendor_id Seller vendor id * * @return array */ function dokan_get_seller_active_withdraw_methods($vendor_id = 0) { } /** * Get a single withdraw method based on key * * @param string $method_key * * @return bool|array */ function dokan_withdraw_get_method($method_key) { } /** * Get title from a withdraw method * * @param string $method_key * @param object|null $request //@since 3.3.7 * * @return string */ function dokan_withdraw_get_method_title($method_key, $request = \null) { } /** * Callback for PayPal in store settings * * @param array $store_settings * * @return void */ function dokan_withdraw_method_paypal($store_settings) { } /** * Callback for Skrill in store settings * * @param array $store_settings * * @return void */ function dokan_withdraw_method_skrill($store_settings) { } /** * Callback for Bank in store settings * * @param array $store_settings * * @return void */ function dokan_withdraw_method_bank($store_settings) { } /** * Returns vendors bank payment require fields. * * @since 3.7.0 * * @return array */ function dokan_bank_payment_required_fields() { } /** * Available bank payment fields in dokan. * * @since 3.7.0 * * @return array */ function dokan_bank_payment_available_fields() { } /** * Dokan bank payment fields placeholders. * Anyone can update any placeholder using 'dokan_bank_payment_fields_placeholders' * * @since 3.7.7 * * @return array */ function dokan_bank_payment_fields_placeholders() { } /** * Get withdraw counts, used in admin area * * @param int $user_id User ID * * @return array */ function dokan_get_withdraw_count($user_id = \null) { } /** * Get active withdraw order status. * * Default is 'completed', 'processing', 'on-hold' * * @return array */ function dokan_withdraw_get_active_order_status() { } /** * Get comma seperated value from "dokan_withdraw_get_active_order_status()" return array * * @return string */ function dokan_withdraw_get_active_order_status_in_comma() { } /** * Get withdraw method formatted icon. * * @since 3.4.3 * * @param string $method_key Withdraw Method key * * @return string */ function dokan_withdraw_get_method_icon($method_key) { } /** * Get withdraw method additional info. * * @since 3.3.7 * * @param string $method_key Withdraw Method key * * @return string */ function dokan_withdraw_get_method_additional_info($method_key) { } /** * Get the default withdrawal method. * * @since 3.3.7 * * @param int $vendor_id * * @return string */ function dokan_withdraw_get_default_method($vendor_id = 0) { } /** * Check if manual withdraw request sending enabled. * * @since 3.3.7 * * @return bool */ function dokan_withdraw_is_manual_request_enabled() { } /** * Check if `Hide Withdraw Option` is enabled and hide withdraw dashboard. * * @since 3.3.7 * * @return bool */ function dokan_withdraw_is_disabled() { } /** * Get the payment methods that are eligable for manual/schedule withdraw. * * @since 3.3.7 * * @return array */ function dokan_withdraw_get_withdrawable_active_methods() { } /** * Check if a withdrawal method is enabled in Dokan > Settings > Withdraw options * * @since 3.6.1 * * @param string $method_id The method id of withdraw method * * @retun bool */ function dokan_is_withdraw_method_enabled($method_id) { } /** * Get registered withdraw methods suitable for Settings Api * * @return array */ function dokan_withdraw_get_chargeable_methods() { } /** * Returns all withdraw methods charges saved. * * @since 3.9.6 * * @return array */ function dokan_withdraw_get_method_charges() { } /** * Wrapper functions to keep BackWards compatibility with WC 2.6 and older versions */ /** * Get product method made backwards compatible * * @since 2.5.7 * * @param WC_Product $product * * @return WC_Product */ function dokan_wc_get_product($product) { } /** * Dynamically access new properties with backwards compatibility * * @since 2.5.7 * * @param Object $object * * @param String $prop * * @param String $callback If the object is fetched using a different callback * * @return $prop */ function dokan_get_prop($object, $prop, $callback = \false) { } /** * Dynamically access new properties with backwards compatibility * * @since 2.5.7 * * @param Object $object * * @param String $prop * * @param String $callback If the object is fetched using a different callback * * @return $prop */ function dokan_replace_func($old_method, $new_method, $object = \null) { } /** * Get order created date * * @since 2.5.7 * * @param WC_Order $order * * @return String date */ function dokan_get_date_created($order) { } /** * Get meta data for given item_id * * @since 2.5.7 * * @param WC_Order $order * * @param int $item_id * * @return $metadata */ function dokan_get_metadata($order, $item_id) { } /** * Get download files for given product * * @since 2.5.8 * * @param WC_Product $product * @return array $downloads */ function dokan_get_product_downloads($product) { } /** * Save variation product price. * * @since 2.5.8 * * @param int $product_id * @param string $regular_price * @param string $sale_price * @param string $date_from * @param string $date_to */ function dokan_save_product_price($product_id, $regular_price, $sale_price = '', $date_from = '', $date_to = '') { } /** * Process product files download paths * * @since 2.5.8 * * @global type $wpdb * @param int $product_id * @param int $variation_id * @param array $downloadable_files */ function dokan_process_product_file_download_paths_permission($product_id, $variation_id, $downloadable_files) { } /** * Sort navigation menu items by position * * @since 3.10.0 moved this method from includes/template-tags.php * * @param array $a first item * @param array $b second item * * @return int */ function dokan_nav_sort_by_pos($a, $b) { } /** * Get Dashboard Navigation menus * * @since 3.10.0 moved this method from includes/template-tags.php * * @return array */ function dokan_get_dashboard_nav(): array { } /** * Checking menu permissions * * @since 2.7.3 * @since 3.10.0 moved this method from includes/template-tags.php * * @return boolean */ function dokan_check_menu_permission($menu) { } /** * Renders the Dokan dashboard menu * * For settings menu, the active menu format is `settings/menu_key_name`. * The active menu will be split at `/` and the `menu_key_name` will be matched * with a settings sub menu array. If it's a match, the settings menu will be shown * only. Otherwise, the main navigation menu will be shown. * * @since 3.10.0 moved this method from includes/template-tags.php * * @param string $active_menu * * @return string rendered menu HTML */ function dokan_dashboard_nav($active_menu = '') { } /** * This method will verify store id, will be used only with rest api validate callback * * @since 3.8.0 * * @param $value * @param $request WP_REST_Request * @param $key * * @return bool|WP_Error */ function dokan_rest_validate_store_id($value, $request, $key) { } /** * This method will verify an order id, will be used only with rest api validate callback * * @since 3.9.7 * * @param $value * @param $request WP_REST_Request * @param $key * * @return bool|WP_Error */ function dokan_rest_validate_order_id($value, $request, $key) { } /** * Dokan Admin menu position * * @since 3.0.0 * * @return string */ function dokan_admin_menu_position() { } /** * Dokan Admin menu capability * * @since 3.0.0 * * @deprecated 5.0.5 Misspelled name; use dokan_admin_menu_capability() instead. * * @return string */ function dokana_admin_menu_capability() { } /** * Dokan Admin menu capability * * @since 3.8.3 * * @return string */ function dokan_admin_menu_capability() { } /** * Dokan Get current user id * * @since 2.7.3 * * @return int */ function dokan_get_current_user_id() { } /** * Check if a user is seller * * @since 3.14.9 Added `$exclude_staff` as optional parameter * * @param int $user_id User ID * @param bool $exclude_staff Exclude staff * * @return bool */ function dokan_is_user_seller($user_id, $exclude_staff = \false) { } /** * Check if a user is customer * * @param int $user_id * * @return bool */ function dokan_is_user_customer($user_id) { } /** * Get reserved URL slugs that cannot be used for custom slugs like store base * * @since 4.1.5 * * @return array List of reserved slugs */ function dokan_get_reserved_url_slugs() { } /** * Check if current user is the product author * * @param int $product_id * * @return bool */ function dokan_is_product_author($product_id = 0) { } /** * Check if it's a store page * * @return bool */ function dokan_is_store_page() { } /** * Check if it's product edit page * * @since 3.0 * * @return bool */ function dokan_is_product_edit_page() { } /** * Check if it's a Seller Dashboard page * * @since 2.4.9 * * @return bool */ function dokan_is_seller_dashboard() { } /** * Redirect to login page if not already logged in * * @return void */ function dokan_redirect_login() { } /** * If the current user is not seller, redirect to homepage * * @param string $redirect */ function dokan_redirect_if_not_seller($redirect = '') { } /** * Count post type from a user * * @param string $post_type * @param int $user_id * @param array $exclude_product_types The product types that will be excluded from count * * @return array */ function dokan_count_posts($post_type, $user_id, $exclude_product_types = ['booking', 'auction']) { } /** * Count stock product type from a user * * @since 3.2.5 * * @param string $post_type * @param int $user_id * @param string $stock_type * @param array $exclude_product_types * * @return int $counts */ function dokan_count_stock_posts($post_type, $user_id, $stock_type, $exclude_product_types = ['booking', 'auction']) { } /** * Get comment count based on post type and user id * * @param string $post_type * @param int $user_id * * @return array */ function dokan_count_comments($post_type, $user_id) { } /** * Get total pageview for a seller * * @param int $seller_id * * @return int */ function dokan_author_pageviews($seller_id) { } /** * Get store seller percentage settings * * @deprecated 3.14.0 Do Not Use This Function * * @param int $seller_id * @param int $product_id * * @return int */ function dokan_get_seller_percentage($seller_id = 0, $product_id = 0, $category_id = 0) { } /** * Get Dokan commission type by seller or product or both * * @deprecated 3.14.0 Do Not Use This Function * * @since 2.6.9 * * @param int $seller_id * @param int $product_id * * @return string $type */ function dokan_get_commission_type($seller_id = 0, $product_id = 0, $category_id = 0) { } /** * Get the default product status for new and edited product for seller based on settings * * @since 3.8.2 * * @param int|null $seller_id * * @return string */ function dokan_get_default_product_status($seller_id = \null) { } /** * Get product status based on user id and settings * * @since 3.7.20 added a new filter hook `dokan_get_new_post_status` * * @since 3.8.2 made the function deprecated * * @param int|null $seller_id * * @deprecated 3.8.2 use `dokan_get_default_product_status` instead * * @return string */ function dokan_get_new_post_status($seller_id = \null) { } /** * Function to get the client ip address * * @since 3.3.1 Updated some logic * * @return string */ function dokan_get_client_ip() { } /** * Generate an input box based on arguments * * @param int $post_id * @param string $meta_key * @param array $attr * @param string $type */ function dokan_post_input_box($post_id, $meta_key, $attr = [], $type = 'text') { } /** * Get user-friendly post status based on post * * @param string $status * * @return string|array */ function dokan_get_post_status($status = '') { } function dokan_get_available_post_status($product_id = 0) { } /** * Get user friendly post status label based class * * @param string $status * * @return string|array */ function dokan_get_post_status_label_class($status = '') { } /** * Get readable product type based on product * * @param string $status * * @return array */ function dokan_get_product_types($status = '') { } /** * Helper function for input text field * * @param string $key * * @return string */ function dokan_posted_input($key, $array = \false) { } /** * Helper function for input textarea * * @param string $key * * @return string */ function dokan_posted_textarea($key) { } /** * Get template part implementation for wedocs * * Looks at the theme directory first */ function dokan_get_template_part($slug, $name = '', $args = []) { } /** * Get other templates (e.g. product attributes) passing attributes and including the file. * * @param mixed $template_name * @param array $args (default: array()) * @param string $template_path (default: '') * @param string $default_path (default: '') * * @return void */ function dokan_get_template($template_name, $args = [], $template_path = '', $default_path = '') { } /** * Locate a template and return the path for inclusion. * * This is the load order: * * yourtheme / $template_path / $template_name * yourtheme / $template_name * $default_path / $template_name * * @param mixed $template_name * @param string $template_path (default: '') * @param string $default_path (default: '') * * @return string */ function dokan_locate_template($template_name, $template_path = '', $default_path = '', $pro = \false) { } /** * Get page permalink based on context * * @param string $page * @param string $context * @param string $subpage * * @return string url of the page */ function dokan_get_page_url($page, $context = 'dokan', $subpage = '') { } /** * Add subpage to url: this will add wpml like plugin compatibility * * @since 3.2.14 * * @param string $subpage * * @param string $url * * @return false|string */ function dokan_add_subpage_to_url($url, $subpage) { } /** * Get edit product url * * @param int|WC_Product $product * @param bool $is_new_product Is new product. Default `false`. * * @return string|false on failure */ function dokan_edit_product_url($product, bool $is_new_product = \false) { } /** * Ads additional columns to admin user table * * @param array $columns * * @return array */ function dokan_admin_product_columns($columns) { } /** * Get the value of a settings field * * @param string $option settings field name * @param string $section the section name this field belongs to * @param string $default_value default text if it's not found * * @return mixed */ function dokan_get_option($option, $section, $default_value = '') { } /** * Redirect users from standard WordPress register page to woocommerce * my account page * * @global string $action */ function dokan_redirect_to_register() { } /** * Check if the seller is enabled * * @since 3.10.0 New filter added `dokan_is_seller_enabled` * * @param int $user_id * * @return bool */ function dokan_is_seller_enabled($user_id): bool { } /** * Check if the seller is trusted * * @param int $user_id * * @return bool */ function dokan_is_seller_trusted($user_id) { } /** * Get store page url of a seller * * @since 3.14.9 Added `$tab` optional parameter. * * @param int $user_id * @param string $tab Tab endpoint (Optional). Default is empty. * * @return string */ function dokan_get_store_url($user_id, $tab = '') { } /** * Get current page URL. * * @since 3.9.1 * * @return string */ function dokan_get_current_page_url() { } /** * Check if current page is store review page * * @since 2.2 * * @return bool */ function dokan_is_store_review_page() { } /** * Helper function for logging * * For valid levels, see `WC_Log_Levels` class * * Description of levels: * 'emergency': System is unusable. * 'alert': Action must be taken immediately. * 'critical': Critical conditions. * 'error': Error conditions. * 'warning': Warning conditions. * 'notice': Normal but significant condition. * 'info': Informational messages. * 'debug': Debug-level messages. * * @param string $message * * @return void */ function dokan_log($message, $level = 'debug') { } /** * Filter WP Media Manager files if the current user is seller. * * Do not show other sellers images to a seller. He can see images only by him * * @param array $args * * @return array */ function dokan_media_uploader_restrict($args) { } /** * Get store info based on seller ID * * @param int $seller_id * * @return array */ function dokan_get_store_info($seller_id) { } /** * Get tabs for showing in a single store page * * @since 2.2 * * @param int $store_id * * @return array */ function dokan_get_store_tabs($store_id) { } /** * Get withdraw email method based on seller ID and type * * @param int $seller_id * @param string $type * * @return string */ function dokan_get_seller_withdraw_mail($seller_id, $type = 'paypal') { } /** * Get seller bank details * * @param int $seller_id * * @return string */ function dokan_get_seller_bank_details($seller_id) { } /** * Get seller listing * * @param array $args * * @return array */ function dokan_get_sellers($args = []) { } /** * Put data with post_date's into an array of times * * @param array $data array of your data * @param string $date_key key for the 'date' field. e.g. 'post_date' * @param string $data_key key for the data you are charting * @param int $interval * @param int $start_date timestamp * @param string $group_by * * @return array */ function dokan_prepare_chart_data($data, $date_key, $data_key, $interval, $start_date, $group_by) { } /** * Disable selling capability by default once a seller is registered * * @param int $user_id */ function dokan_admin_user_register($user_id) { } /** * Get percentage based owo two numeric data * * @param int $this_period * @param int $last_period * * @return array */ function dokan_get_percentage_of($this_period = 0, $last_period = 0) { } /** * Get seller count based on enable, disabled sellers and time period * * @param string $from * @param string $to * * @return array */ function dokan_get_seller_count($from = \null, $to = \null) { } /** * Get product count of this month and last month with percentage * * @param string $from * @param string $to * * @return array */ function dokan_get_product_count($from = \null, $to = \null, $seller_id = \null) { } /** * Dokan prepare date query * * @param string $from * @param string $to * * @return array */ function dokan_prepare_date_query($from, $to) { } /** * Get seles count based on this month and last month * * @global WPDB $wpdb * * @return array */ function dokan_get_sales_count($from = \null, $to = \null, $seller_id = 0) { } /** * Prevent sellers and customers from seeing the admin bar * * @param bool $show_admin_bar * * @return bool */ function dokan_disable_admin_bar($show_admin_bar) { } /** * Filter products of current user * * @since 2.7.3 * * @param object $query * * @return object $query */ function dokan_filter_product_for_current_vendor($query) { } /** * Remove sellerdiv metabox when a seller can access the backend * * @since 2.7.8 * * @return void */ function dokan_remove_sellerdiv_metabox() { } /** * Human readable number format. * * Shortens the number by dividing 1000 * * @param float|int $number * * @return float|int|string */ function dokan_number_format($number) { } /** * Get coupon edit url * * @param int $coupon_id * @param string $coupon_page * * @return string */ function dokan_get_coupon_edit_url($coupon_id, $coupon_page = '') { } /** * Filter `get_avatar_url` to retrieve image url from dokan profile settings * called by `get_avatar_url()` as well as `get_avatar()` * * @since 2.7.0 * * @param string $url avatar url * @param mixed $id_or_email userdata or user_id or user_email * @param array $args arguments * * @return string maybe modified url */ function dokan_get_avatar_url($url, $id_or_email, $args) { } /** * Get navigation url for the dokan dashboard * * @param string $name endpoint name * @param bool $new_url if true, it will return the new url format * * @return string url */ function dokan_get_navigation_url($name = '', $new_url = \false) { } /** * Generate country dropdwon * * @param array $options * @param string $selected * @param bool $everywhere */ function dokan_country_dropdown($options, $selected = '', $everywhere = \false) { } /** * Generate country dropdwon * * @param array $options * @param string $selected * @param bool $everywhere */ function dokan_state_dropdown($options, $selected = '', $everywhere = \false) { } /** * Shupping Processing time dropdown options * * @return array */ function dokan_get_shipping_processing_times() { } /** * Get a single processing time string * * @param string $index * * @return string */ function dokan_get_processing_time_value($index) { } /** * Send email to seller and admin when there is no product in stock or low stock * * @since 2.8.0 * * @param string $recipient recipients email * @param WC_Product $product * * @return string recipient emails */ function dokan_wc_email_recipient_add_seller_no_stock($recipient, $product) { } /** * Get all the months of products of a vendor. * * @since DOKAN_LITE * * @param int $user_id * * @return object */ function dokan_get_products_listing_months_for_vendor($user_id) { } /** * Display a monthly dropdown for filtering product listing on seller dashboard * * @since 2.1 * * @param int $user_id */ function dokan_product_listing_filter_months_dropdown($user_id) { } /** * Display form for filtering product listing on seller dashboard * * @since 2.1 */ function dokan_product_listing_filter() { } /** * Search by SKU or ID for seller dashboard product listings. * * @param string $where * * @return string */ function dokan_product_search_by_sku($where) { } /** * Dokan Social Profile fields * * @since 2.2 * * @return array */ function dokan_get_social_profile_fields() { } /** * Generate Address fields form for seller * * @since 2.3 * * @param bool $verified verified * @param bool $required required * * @return void */ function dokan_seller_address_fields($verified = \false, $required = \false) { } /** * Generate Address string | array for given seller id or current user * * @since 2.3 * * @param int $seller_id, defaults to current_user_id * @param bool $get_array, if true returns array instead of string * * @return string|array Address | array Address */ function dokan_get_seller_address($seller_id = 0, $get_array = \false) { } /** * Dokan get seller short formatted address * * @since 2.5.7 * * @param int $store_id * @param bool $line_break * * @return string */ function dokan_get_seller_short_address($store_id, $line_break = \true) { } /** * Get terms and conditions page * * @since 2.3 * * @param int $store_id * * @return string */ function dokan_get_toc_url($store_id) { } /** * Login Redirect * * @since 2.4 * * @param string $redirect_to [url] * @param WP_User $user * * @return string [url] */ function dokan_after_login_redirect($redirect_to, $user) { } /** * Check if the post belongs to the given user * * @param int $post_id * @param int $user_id * * @return bool */ function dokan_is_valid_owner($post_id, $user_id) { } function dokan_set_is_home_false_on_store() { } /** * Register dokan store widget * * @return void */ function dokan_register_store_widget() { } /** * Calculate category wise commission for given product. * * @deprecated 3.14.0 Do Not Use This Function * * @since 2.6.8 * * @param int $product_id * * @return int $commission_rate */ function dokan_get_category_wise_seller_commission($product_id, $category_id = 0) { } /** * Calculate category wise commission type for given product. * * @deprecated 3.14.0 Do Not Use This Function * * @since 2.6.9 * * @param int $product_id * * @return int $commission_rate */ function dokan_get_category_wise_seller_commission_type($product_id, $category_id = 0) { } /** * Get seller earning for a given product * * @since 2.6.9 * * @param int $product_id * @param int $seller_id * * @deprecated 2.9.11 * * @return float $earning | zero on failure or no price */ function dokan_get_earning_by_product($product_id, $seller_id) { } /** * Delete user's details when the user is deleted * * @since 2.6.9 * * @param int $user_id , int $reassign * * @return void */ function dokan_delete_user_details($user_id, $reassign) { } /** * Get a vendor * * @since 2.6.10 * * @param int $vendor_id * * @return WeDevs\Dokan\Vendor\Vendor */ function dokan_get_vendor($vendor_id = \null) { } /** * Get all cap related to seller * * @since 2.7.3 * * @return array */ function dokan_get_all_caps() { } /** * Get translated capability * * @since 3.0.2 * * @param string $cap * * @return string */ function dokan_get_all_cap_labels($cap) { } /** * Merge user defined arguments into defaults array. * * This function is similiar to WordPress wp_parse_args(). * It's support multidimensional array. * * @param array $args * @param array $defaults optional * * @return array */ function dokan_parse_args(&$args, $defaults = []) { } function dokan_get_translations_for_plugin_domain($domain, $language_dir = \null) { } /** * Returns Jed-formatted localization data. * * @param string $domain translation domain * * @return array */ function dokan_get_jed_locale_data($domain, $language_dir = \null) { } /** * Dokan get translated days * * @since 2.8.2 * * @param string|null $days * @maram string/null $form * * @return string|array */ function dokan_get_translated_days($day = '', $form = 'long') { } /** * Collect store times here. * * @since 3.3.7 * * @param string $day * @param string $return_type eg: opening_time or closing_time * @param int $index * @param int|null $store_id * * @return mixed|string */ function dokan_get_store_times($day, $return_type, $index = \null, $store_id = \null) { } /** * Dokan is store open * * @since 2.8.2 * @since 3.2.1 replaced time related functions with dokan_current_datetime() * * @param int $user_id * * @return bool */ function dokan_is_store_open($user_id) { } /** * Dokan get pro buy now url * * @since 2.8.5 * * @return string [url] */ function dokan_pro_buynow_url() { } /** * Remove hook for anonymous class * * @param string $hook_name * @param string $class_name * @param string $method_name * @param int $priority * * @return bool */ function dokan_remove_hook_for_anonymous_class($hook_name = '', $class_name = '', $method_name = '', $priority = 0) { } /** * Dokan get variable product earnings * * @deprecated 2.9.21 * * @param int $product_id * @param bool $formated * @param bool $deprecated * * @return float|string */ function dokan_get_variable_product_earning($product_id, $formated = \true, $deprecated = \false) { } /** * Get page permalink of dokan pages by page id * * @since 2.9.10 * * @param string $page_id * * @return string */ function dokan_get_permalink($page_id) { } /** * Check if it's store listing page * * @since 2.9.10 * * @return bool */ function dokan_is_store_listing() { } /** * Dokan generate username * * @param string $name * * @return string */ function dokan_generate_username($name = 'store') { } /** * Replaces placeholders with links to policy pages. * * @since 2.9.10 * * @param string $text text to find/replace within * * @return string */ function dokan_replace_policy_page_link_placeholders($text) { } /** * Dokan privacy policy text * * @since 2.9.10 * @since DOKAN_LITE_VERSION Add `$return` param to return the text on demand instead of printing * * @param bool $return * * @return string */ function dokan_privacy_policy_text($return = \false) { } /** * Dokan commission types * * @since 2.9.21 * * @return array */ function dokan_commission_types() { } /** * Dokan Login Form * * @since 2.9.11 * * @param array $args * @param bool $echo * * @return void|string */ function dokan_login_form($args = [], $echo = \false) { } /** * Validate a boolean variable * * @since 2.9.12 * * @param mixed $var * * @return bool */ function dokan_validate_boolean($var) { } /** * Backward compatibile settings option map * * @since 2.9.21 * * @param string $option * @param string $section * * @return array */ function dokan_admin_settings_rearrange_map($option, $section) { } /** * Dokan get terms and condition page url * * @since 2.9.16 * * @return string | null on failure */ function dokan_get_terms_condition_url() { } /** * Get Seller status counts, used in admin area * * @since 2.9.23 * * @return array */ function dokan_get_seller_status_count() { } /** * Count the vendors that are waiting for admin approval. * * Delegates to the very query the Vendors list is built from, so the badge can never * claim a count the Pending tab is unable to show. Both read a missing * `dokan_enable_selling` flag as pending, as `dokan_is_seller_enabled()`, * `dokan_get_seller_status_count()` and the Users-screen "Pending Vendors" filter all * do. That includes an administrator who never touched the seller fields, since * `dokan_admin_user_register()` only writes the flag for the `seller` role. * * Cached in the shared `vendors` group, which VendorCache already invalidates on * vendor create/update/delete and on enable/disable. * * @since 5.0.13 * * @return int */ function dokan_get_pending_vendor_count() { } /** * Install a plugin from wp.org * * Installs *and activates* the plugin, despite the name. * * Performs no capability check by design, so that non-request callers such as WP-CLI and * cron keep working. Installing and activating arbitrary code is a full-trust action, so * any caller reachable from a request MUST gate itself on `install_plugins` and * `activate_plugins` first — `manage_woocommerce` is not sufficient, since a Shop Manager * holds it without holding either plugin capability. * * Example: * To download WooCommerce `dokan_install_wp_org_plugin( 'woocommerce' )` * To download plugin like dokan-lite that has different slug and main plugin file, * `dokan_install_wp_org_plugin( 'dokan-lite', 'dokan.php' )` * * @since 2.9.27 * * @param string $plugin_slug * @param string $main_file * * @return bool|\WP_Error */ function dokan_install_wp_org_plugin($plugin_slug, $main_file = \null) { } /** * Redirect to Dokan admin setup wizard page * * @since 2.9.27 * * @return void */ function dokan_redirect_to_admin_setup_wizard() { } /** * Dokan generate star ratings * * @since 3.0.0 * * @param int $rating Number of rating point * @param int $starts Total number of stars * * @return string */ function dokan_generate_ratings($rating, $stars) { } /** * Check if current PHP version met the minimum requried PHP version for WooCommerce * * @since 3.0.0 * * @param string $required_version * * @return bool */ function dokan_met_minimum_php_version_for_wc($required_version = '7.0') { } /** * Checks if Dokan settings has map api key * * @since 3.0.2 * * @return bool */ function dokan_has_map_api_key() { } /** * Dokan clear product caches. * We'll be calling `WC_Product_Data_Store_CPT::clear_caches()` to clear product caches. * * @since 3.0.3 * * @param int|\WC_Product $product * * @return void */ function dokan_clear_product_caches($product) { } /** * Check which vendor info should be hidden * * @since 3.0.4 * * @param string $option * * @return bool|array if no param is passed */ function dokan_is_vendor_info_hidden($option = \null) { } /** * Function current_datetime() compatibility for wp version < 5.3 * * @since 3.1.1 * * @return DateTimeImmutable */ function dokan_current_datetime() { } /** * Function wp_timezone() compatibility for wp version < 5.3 * * @since 3.1.1 * * @return DateTimeZone */ function dokan_wp_timezone() { } /** * Function wp_timezone_string() compatibility for wp version < 5.3 * * @since 3.1.1 * * @return string */ function dokan_wp_timezone_string() { } /** * Get a formatted date, time from WordPress format * * @since 3.2.7 * * @param string|bool $format date format string or false for default WordPress date * @param string|int|DateTimeImmutable $date the date string or timestamp or DateTimeImmutable object * * @return string|false The date, translated if locale specifies it. False on invalid timestamp input. */ function dokan_format_datetime($date = '', $format = \false) { } /** * Get a formatted date from WordPress format * * @since 3.1.1 * * @param string|int|DateTimeImmutable $date the date string or timestamp or DateTimeImmutable object * @param string|bool $format date format string or false for default WordPress date * * @return string|false The date, translated if locale specifies it. False on invalid timestamp input. */ function dokan_format_date($date = '', $format = \false) { } /** * Get a formatted time from WordPress format * * @since 3.5.1 * * @param string|int|DateTimeImmutable $date the date string or timestamp or DateTimeImmutable object * @param string|bool $format date format string or false for default WordPress date * * @return string|false The date, translated if locale specifies it. False on invalid timestamp input. */ function dokan_format_time($date = '', $format = \false) { } /** * Create an expected date time format from a given format. * * @since 3.7.1 * * @param string $format Date string format * @param string $date_string Date time string * * @return DateTimeImmutable|false */ function dokan_create_date_from_format($format, $date_string) { } /** * Convert times in expected format. * * @param array|string $times_data Times data * @param string $input_format Times current format * @param string $output_format Times converted format * * @return string|array */ function dokan_convert_date_format($times_data, $input_format = 'g:i a', $output_format = 'g:i a') { } /** * This method will convert datetime string into timestamp * * @since 3.2.15 * * @param string $date_string * @param bool $gmt_date * * @return bool|int date timestamp on success, false otherwise */ function dokan_get_timestamp($date_string, $gmt_date = \false) { } /** * Get inverval between two dates, useful for chart functions * * @since 3.7.0 * * @param string|int $start_date * @param string|int $end_date * @param string $group_by * * @return false|int */ function dokan_get_interval_between_dates($start_date, $end_date, $group_by = 'day') { } /** * Format date time string to WC format * * @since 2.6.8 * @since 3.7.0 This method was moved from wc-functions.php * * @param string $time * @param boolean $date_only * * @deprecated 3.8.0 * * @return string */ function dokan_date_time_format($time, $date_only = \false) { } /** * Get threshold day for a user * * @since 3.2.2 * * @param int $user_id * * @return int threshold day */ function dokan_get_withdraw_threshold($user_id) { } /** * Mask or hide part of email address. * * @since 3.3.1 * * @param string $email Email address * * @return string */ function dokan_mask_email_address($email) { } /** * Mask or hide part of string. * * @since 3.7.22 * * @param string $text text * @param integer $position * * @return string */ function dokan_mask_string($text, $position = 1, $show_max_letters = 4) { } /** * Add item in specific position of an array * * @since 2.9.21 * * @param array $array * @param int|string $position * @param array $new_array * * @return array */ function dokan_array_after($array, $position, $new_array) { } /** * Insert a value or key/value pair (assoc array) after a specific key in an array. If key doesn't exist, value is appended * to the end of the array. * * @since 3.2.16 * * @param array $old_array * @param array $new_array * @param string $insert_after_key * * @return array */ function dokan_array_insert_after(array $old_array, array $new_array, $insert_after_key = '') { } /** * Check a order have apply admin coupon * * @since 3.2.16 * * @param WC_Order $order * @param int $vendor_id * @param int $product_id * * @return bool */ function dokan_is_admin_coupon_applied($order, $vendor_id, $product_id = 0) { } /** * Get vendor store banner width * * Added new filter hook for vendor store * banner width size @hook dokan_store_banner_default_width * * @since 3.2.15 * * @return int $width Banner width */ function dokan_get_vendor_store_banner_width() { } /** * Get vendor store banner height * * Added new filter hook for vendor * store banner height size @hook dokan_store_banner_default_height * * @since 3.2.15 * * @return int $height Banner height */ function dokan_get_vendor_store_banner_height() { } /** * Get google recaptcha site key and secret key * * @since 3.3.3 * * @deprecated 4.3.0 * * @param bool $boolean * * @return array|bool */ function dokan_get_recaptcha_site_and_secret_keys($boolean = \false) { } /** * Handle google reCaptcha validation request. * * @since 3.3.6 * @deprecated 4.3.0 * * @param string $action * @param string $token * @param string $secretkey * * @return boolean */ function dokan_handle_recaptcha_validation($action, $token, $secretkey) { } /** * Get additional products sections. * * @since 3.3.6 * * @return array */ function dokan_get_additional_product_sections() { } /** * Converts a 'on' or 'off' to boolean * * @since 3.3.6 * * @param string $value * * @return bool */ function dokan_string_to_bool($value) { } /** * Converts a boolean value to a 'on' or 'off'. * * @since 3.3.7 * * @param bool $bool * * @return string */ function dokan_bool_to_on_off($bool) { } /** * Check is 12-hour format in current setup. * * @since 3.6.0 * * @return bool */ function is_tweleve_hour_format() { } /** * Sanitize phone number. * Allows only numbers and "+" (plus sign) "." (full stop) "(" ")" "-". * * @since 3.7.0 * * @param string $phone Phone number. * * @return string */ function dokan_sanitize_phone_number($phone) { } /** * Dokan override author ID from admin * * @since 2.6.2 * @since 3.7.18 moved this method from includes/Admin/functions.php file * * @param WC_Product $product * @param integer $seller_id * * @return void */ function dokan_override_product_author($product, $seller_id) { } /** * Overrides author for products with variations. * * @since 3.7.4 * @since 3.7.18 moved this method from includes/Admin/functions.php file * * @param WC_Product $product * @param int $seller_id * * @return void */ function dokan_override_author_for_product_variations($product, $seller_id) { } function dokan_user_update_to_seller($user, $data) { } /** * Get new product creation URL. * * @since 3.9.7 * * @return false|string */ function dokan_get_new_product_url() { } /** * Generate SQL query and fetch the report data based on the arguments passed * * This function was cloned from WC_Admin_Report class. * * @since 1.0 * * @global WPDB $wpdb * @global WP_User $current_user * @param array $args * @param string $start_date * @param string $end_date * @return obj */ function dokan_get_order_report_data($args, $start_date, $end_date) { } /** * Generate seller dashboard overview chart * * @since 1.0 * @return void */ function dokan_dashboard_sales_overview() { } /** * Prepares chart data for sales overview * * @since 1.0 * * @param string $start_date * @param string $end_date * @param string $group_by * * @return void */ function dokan_sales_overview_chart_data($start_date, $end_date, $group_by) { } /** * Checks if the theme sidebar is enabled on store page * * @since 3.1.0 * * @return bool */ function dokan_store_theme_sidebar_enabled() { } /** * Display navigation to next/previous pages when applicable */ function dokan_content_nav($nav_id, $query = \null) { } function dokan_page_navi($before, $after, $wp_query) { } function dokan_product_dashboard_errors() { } function dokan_product_listing_status_filter() { } function dokan_order_listing_status_filter() { } /** * Store category menu for a store * * @param int $seller_id * * @since 3.2.11 rewritten whole function * * @return void */ function dokan_store_category_menu($seller_id) { } /** * Store category menu for a store * * @since 3.5.0 * * @param int $seller_id * @param array $taxonomy * @param string $query_type * * @return void */ function dokan_store_term_menu_list($seller_id, $taxonomy, $query_type) { } /** * Return the currently viewed term slug. * * @return int */ function dokan_get_current_term_slug() { } /** * Get chosen taxonomy attributes. * * @since 3.5.0 * * @return array */ function dokan_get_chosen_taxonomy_attributes() { } function dokan_seller_reg_form_fields() { } function dokan_seller_not_enabled_notice() { } /** * User top navigation menu * * @return void */ function dokan_header_user_menu() { } /** * Redirect My order in Login page without user logged login * * @since 2.4 * * @return [redirect] */ function dokan_myorder_login_check() { } /** * Store sidebar widget args * * @return array */ function dokan_store_sidebar_args() { } /** * Store single category widget * * @return void */ function dokan_store_category_widget() { } /** * Store single location widget * * @return void */ function dokan_store_location_widget() { } /** * Store opening/closing time widget * * @return void */ function dokan_store_time_widget() { } /** * Store contact form widget * * @return void */ function dokan_store_contact_widget() { } /** * Get seller registration form default role * * @since 3.10.3 * * @return string values can be 'customer' or 'seller' */ function dokan_get_seller_registration_default_role(): string { } /** * Get Dokan seller registration form data * * @since 3.7.0 * * @return string[] */ function dokan_get_seller_registration_form_data() { } /** * Save the product data meta box. * * @access public * * @param int $post_id * @param array $data * * @throws WC_Data_Exception * @return void */ function dokan_process_product_meta(int $post_id, array $data = []) { } /** * Grant downloadable file access to any newly added files on any existing. * orders for this product that have previously been granted downloadable file access. * * @param int $product_id product identifier * @param int $variation_id optional product variation identifier * @param array $downloadable_files newly set files * * @deprecated 3.8.0 * * @return void */ function dokan_process_product_file_download_paths(int $product_id, int $variation_id, array $downloadable_files) { } /** * Get discount coupon total from an order * * @param int $order_id * * @deprecated 3.8.0 * * @return int */ function dokan_sub_order_get_total_coupon(int $order_id): int { } /** * Change seller display name to store name * * @since 2.4.10 [Change seller display name to store name] * * @param string $display_name * * @return string $display_name */ function dokan_seller_displayname($display_name) { } /** * Get featured products * * Shown on homepage * * @param int $per_page * * @return WP_Query */ function dokan_get_featured_products($per_page = 9, $seller_id = '', $page = 1) { } /** * Get the latest products * * Shown on homepage * * @param int $per_page * * @return WP_Query */ function dokan_get_latest_products($per_page = 9, $seller_id = '', $page = 1) { } /** * Get best-selling products * * Shown on homepage * * @param int $per_page * * @return WP_Query */ function dokan_get_best_selling_products($per_page = 8, $seller_id = '', $page = 1, $hide_outofstock = \false) { } /** * Check More product from Seller tab is active or not. * * @since 2.5 * * @return boolean */ function check_more_seller_product_tab() { } /** * Check if Vendor Info tab enabled in single product page. * * @since 3.9.0 * * @return boolean */ function is_enabled_vendor_info_product_tab() { } /** * Get top-rated products * * Shown on homepage * * @param int $per_page * * @return WP_Query */ function dokan_get_top_rated_products($per_page = 8, $seller_id = '', $page = 1) { } /** * Get products on-sale * * Shown on homepage * * @param int $per_page * @param int $paged * @param int $seller_id * * @return WP_Query */ function dokan_get_on_sale_products(int $per_page = 10, int $paged = 1, int $seller_id = 0): \WP_Query { } /** * Get current balance of a seller * * Total = SUM(net_amount) - SUM(withdraw) * * @param int $seller_id * @param bool $formatted * * @return float|string float if formatted is false, string otherwise */ function dokan_get_seller_balance($seller_id, $formatted = \true) { } /** * Get Seller Earned amount * * @since 2.5.4 * * @param boolean $formatted * @param string $on_date * * @param int $seller_id * * @return float|null */ function dokan_get_seller_earnings($seller_id, $formatted = \true, $on_date = '') { } /** * Get seller rating * * @param int $seller_id * * @return array */ function dokan_get_seller_rating($seller_id) { } /** * Get seller rating in a readable rating format * * @param int $seller_id * * @return string */ function dokan_get_readable_seller_rating($seller_id) { } /** * Woocommerce Admin dashboard Sales Report Synced with Dokan Dashboard report * * @since 2.4.3 * * @param array $query * * @return array */ function dokan_filter_woocommerce_dashboard_status_widget_sales_query($query) { } /** * Handle password edit and name update functions * * @since 2.4.10 * * @return void */ function dokan_save_account_details() { } /** * Remove banner when without banner layout selected for profile * * @param array $progress_values * * @return array */ function dokan_split_profile_completion_value($progress_values) { } /** * Set More products from seller tab on Single Product Page * * @since 2.5 * * @param array $tabs * * @return array */ function dokan_set_more_from_seller_tab($tabs) { } /** * Show more products from current seller * * @since 2.5 * @since 3.2.2 added filter 'dokan_get_more_products_per_page' * * @param int|string $seller_id * @param int|string $posts_per_page * * @return void */ function dokan_get_more_products_from_seller($seller_id = 0, $posts_per_page = 6) { } /** * Keep old vendor after duplicate any product * * @param WC_Product $duplicate * @param WC_Product $product * * @return void */ function dokan_keep_old_vendor_woocommerce_duplicate_product($duplicate, $product) { } /** * @since 3.7.24 * * @param boolean $is_purchasable * @param object $product * * @return boolean */ function dokan_vendor_own_product_purchase_restriction(bool $is_purchasable, $product): bool { } /** * Restricts vendor from reviewing own product * * @since 3.7.24 * * @param array $data * @return array */ function dokan_vendor_product_review_restriction(array $data): array { } /** * Monitors a new order and attempts to create sub-orders * * If an order contains products from multiple vendor, we can't show the order * to each seller dashboard. That's why we need to divide the main order to * some sub-orders based on the number of sellers. * * @param int $parent_order_id * * @deprecated 3.8.0 * * @return void */ function dokan_create_sub_order($parent_order_id) { } /** * Creates a sub order * * @param int $parent_order * @param int $seller_id * @param array $seller_products * * @deprecated 3.8.0 * * @return void */ function dokan_create_seller_order($parent_order, $seller_id, $seller_products) { } /** * Create coupons for a sub-order if neccessary * * @param WC_Order $parent_order * @param int $order_id * @param array $product_ids * * @return void */ function dokan_create_sub_order_coupon($parent_order, $order_id, $product_ids) { } /** * Create shipping for a sub-order if neccessary * * @param WC_Order $parent_order * @param int $order_id * @param array $seller_products * * @throws Exception * * @return mixed */ function dokan_create_sub_order_shipping($parent_order, $order_id, $seller_products) { } /** * Injects seller name on cart and other areas * * @param array $item_data * @param array $cart_item * * @return array */ function dokan_product_seller_info($item_data, $cart_item) { } /** * Adds a seller tab in product single page * * @param array $tabs * * @return array */ function dokan_seller_product_tab($tabs) { } /** * Prints seller info in product single page * * @global WC_Product $product */ function dokan_product_seller_tab() { } /** * Show sub-orders on a parent order if available * * @param WC_Order $parent_order * @return void */ function dokan_order_show_suborders($parent_order) { } /** * Default seller image * * @return string */ function dokan_get_no_seller_image() { } /** * Override Customer Orders array * * @param post_arg_query array() * * @return array() post_arg_query */ function dokan_get_customer_main_order($customer_orders) { } /** * Add edit post capability to woocommerce proudct post type * * @since 2.6.9 * * @param capability array * * @return capability array */ function dokan_manage_capability_for_woocommerce_product($capability) { } /** * Author field for product quick edit * * @return void */ function dokan_author_field_quick_edit($scope = \null) { } /** * Assign value for quick edit data * * @param array $column * @param integer $post_id * * @return void */ function dokan_vendor_quick_edit_data($column, $post_id) { } /** * Save quick edit data * * @param WC_Product $product * * @return void */ function dokan_save_quick_edit_vendor_data($product) { } /** * Add go to vendor dashboard button to my account page * * @since 2.8.2 * * @return string */ function dokan_set_go_to_vendor_dashboard_btn() { } /** * Attach vendor name into order details * * @param int item_id * * @param object order * * @since 2.8.3 * * @return void */ function dokan_attach_vendor_name($item_id, $order) { } /** * Enable yoast seo breadcrums in dokan store page * * @param array $crumbs * * @return array */ function enable_yoast_breadcrumb($crumbs) { } /** * Dokan add privacy policy * * @return string */ function dokan_add_privacy_policy() { } /** * Build a URL. * * The parts of the second URL will be merged into the first according to * the flags argument. * * @param mixed $url (part(s) of) an URL in form of a string or * associative array like parse_url() returns * @param mixed $parts same as the first argument * @param int $flags a bitmask of binary or'ed HTTP_URL constants; * HTTP_URL_REPLACE is the default * @param array $new_url if set, it will be filled with the parts of the * composed url like parse_url() would return * @return string */ function http_build_url($url, $parts = array(), $flags = \HTTP_URL_REPLACE, &$new_url = array()) { } }