Aller au contenu principal

woocommerce_plugin

WooCommerce

The Local Delivery by DoorDash plugin provides developers and site administrators options to tailor the customer experience that aligns with the merchant's operations.

Installation

This document covers configuration settings, a separate tutorial describes installation of the plugin.

Logging

Local Delivery by DoorDash keeps a log under WooCommerce > Status > Logs. Select a log titled “woocommerce-doordash-NNNN-NN-NN” from the drop down menu to view a log by date. API requests are logged, as well as any errors.

Hooks and Filters

In WordPress, hooks are a way for one piece of code to interact or modify another piece of code at specific, pre-defined spots. See the WordPress codex for more information on using action hooks and filters.

This plugin provides a variety of hooks and filters to allow for developers to change the default functionality and extend the plugin. The following is a list of provided hooks.

Filters

wcdd_email_new_order_to_location
Allows for the new order email to be disabled for locations.

wcdd_contact_send_notifications
Can be used to disable SMS notifications to dropoff contacts.

wcdd_contactless_dropoff
Set to true to enable contactless dropoff.

wcdd_time_format
Filters the time format used in the plugin. Defaults to the time format selected in the WordPress settings. Uses PHP time format.

wcdd_pickup_time_increment
Allows for the time increment used in the delivery time dropdown to be modified. Defaults to 15 (minutes).

wcdd_delivery_day_format
Changes the time format used in the delivery day dropdown. Defaults to D, n/j. Uses PHP time format.

wcdd_delivery_number_of_days_ahead
How many available delivery days to show in the delivery day dropdown. Defaults to 14.

wcdd_tip_options
Change the default values for the tip selector. This filter expects an array with keys as a decimal string and values as the label, for example '.20' => '20%'. The array key other can be used to display the option for a custom tip amount.

wcdd_default_tip_option
The default selection for the tip. Should correspond to an array key defined in wcdd_tip_options.

wcdd_show_doordash_logo
Return false to disable the display of the DoorDash logo at the bottom of the delivery options.

wcdd_enabled_locations_query_args
This filter can be used to modify the query arguments for retrieving available pickup locations from the WordPress database.

wcdd_enabled_locations
Filters the array of pickup locations after they have been retrieved.

wcdd_location_option_name
Allows for the modification of the displayed location name, given the location object.

Action Hooks

wcdd_delivery_quote_accepted
This hook is run immediately after the API call to accept the delivery quote. The delivery object and the order are available parameters.