Default Permissions in Dokan
In Dokan we have 2 more roles along with the default WordPress roles. Those 2 roles are Vendor and Vendor Staff. Both roles are crucial… Read More »Default Permissions in Dokan
In Dokan we have 2 more roles along with the default WordPress roles. Those 2 roles are Vendor and Vendor Staff. Both roles are crucial… Read More »Default Permissions in Dokan
Description # Return if the current item is store listing page. Return # (bool) Params # None Usage # Hooks # dokan_is_store_listing
Description # Generates and returns an available username. If we pass an existing username, -1, -2 or -3 will be appended at the end of the username. So if the store is already using as a username it will return store-1, if store-1 also exists it will return store-2. Return # (string) Params # $name (string) (optional): The name to generate the username. default: store Usage #
Description # Returns an associative array of dokan-lite commission types. Currently Flat and Percentage. Return # (array) Params # None Usage # Here is an example of how we can make a select field from the… Read More »dokan_commission_types()
Description # This function check if the passed arguments is a boolean and return true if it is a boolean, false otherwise. Important Note # This function uses FILTER_VALIDATE_BOOLEAN constant in PHP filter_var function. FILTER_VALIDATE_BOOLEAN tries to be smart, recognizing words like Yes, No, Off, On, both string and native types of true and false, and is not casesensitive when validating strings. So passing ‘Yes’, ‘off’, ‘on’ as dokan_validate_boolean function argument will be treated as true/false. Please see usage for some examples. Return # (bool) Params # None Usage #
Description # Get a count of all sellers, active sellers, and inactive sellers as an associative array. The array format is:total => number of total sellers,active => number of active sellers,inactive => number of inactive sellers, Return # (array) Params # None Usage # Hooks # dokan_get_seller_status_count (filter)
Description # This function checks if a map API key is set in dokan settings. It will check for google map and mapbox API key. Returns true if either one is found. Return false if no map API key is found. Return # (bool) Params # None Usage #
Description # check if a specific information should be hidden in the frontend. The option could be email, phone, address. Returns true or false if… Read More »dokan_is_vendor_info_hidden( string $option = null )
Description # dokan_current_datetime is a wrapper of WordPress’s current_datetime for getting the DateTimeImmutable object for WordPress version less then 5.3. Return # (DateTimeImmutable) A DateTimeImmutable… Read More »dokan_current_datetime()
Description # Returns a human-readable date depending on the arguments. Return # (string|false) The date, translated if the locale specifies it. False on invalid timestamp… Read More »dokan_format_date()