Skip to content

Instantly share code, notes, and snippets.

Avatar
🤑
Growing revenue streams

Robert DeVore robertdevore

🤑
Growing revenue streams
View GitHub Profile
View ddwc-remove-delivery-fee-from-driver-dashboard.php
<?php
/**
* Remove "Delivery" from driver dashboard order details page.
*/
add_filter( 'ddwc_driver_dashboard_delivery_total', '__return_false' );
View ddwc-remove-order-total-from-driver-dashboard.php
<?php
/**
* Remove "Total" from driver dashboard assigned orders table head.
*/
function acme_driver_dashboard_assigned_orders_order_table_thead( $thead ) {
unset( $thead[3] );
return $thead;
}
add_filter( 'ddwc_driver_dashboard_assigned_orders_order_table_thead', 'acme_driver_dashboard_assigned_orders_order_table_thead', 10, 1 );
View delivery-times-checkout-default-delivery-text.php
<?php
/**
* Delivery Times for WooCommerce checkout select default text
*
* Change the default text that gets displayed in the delivery times checkout select field
*
* @param string $text - the default text
*
* @return string
*/
@robertdevore
robertdevore / wait-el.js
Created Jul 10, 2020 — forked from chrisjhoughton/wait-el.js
Wait for an element to exist on the page with jQuery
View wait-el.js
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};
View ddwc-pro-unclaimed-orders-statuses-filter.php
<?php
/**
* Filter the order statuses used in the Unclaimed Orders table
*
* @url https://www.deviodigital.com/product/delivery-drivers-for-woocommerce-pro/
* @param $statuses array
* @return array
*/
function acme_unclaimed_orders_status_array( $statuses ) {
$statuses = array( 'processing', 'another', 'example' );
View ddwc-driver-login-redirect-filter.php
<?php
/**
* Change redirect URL for driver login
*
* @url https://wordpress.org/plugins/delivery-drivers-for-woocommerce
* @return string
*/
function acme_login_redirect( $link ) {
// Change the value to your full my-account URL (https://etc)
$link = 'YOUR_URL_HERE';
@robertdevore
robertdevore / dtwc-date-format-filter.php
Last active Apr 20, 2020
Customize the date output in the Delivery Times for WooCommerce
View dtwc-date-format-filter.php
<?php
/**
* Delivery Times for WooCommerce
*
* Change the date format (default: M j, Y)
*
* @link https://wordpress.org/plugins/delivery-times-for-woocommerce/
* @return string
*/
function acme_date_format( $format ) {
View ddwc-delivery-address-google-map-filter.php
<?php
/**
* Google Maps filter
*
* @author Robert DeVore <deviodigital@gmail.com>
* @link https://www.wordpress.org/plugins/delivery-drivers-for-woocommerce/
* @return string
*/
function acme_google_maps_delivery_address( $google_map, $delivery_address, $store_address ) {
// Change the google map.
@robertdevore
robertdevore / age-verification-after-content-filter.php
Last active Dec 4, 2019
Add your own content to the Age Verification plugin for WordPress
View age-verification-after-content-filter.php
<?php
/**
* Add content after the Age Verification pop up content
*
* @author Robert DeVore <deviodigital@gmail.com>
* @link https://www.wordpress.org/plugins/dispensary-age-verification/
* @return string
*/
function acme_after_popup_content( $string ) {
// Change the following to anything you'd like to display.
@robertdevore
robertdevore / ddwc-endpoint-title-filter.php
Last active Dec 2, 2019
Change the "Driver Dashboard" endpoint title for the WooCommerce menu items
View ddwc-endpoint-title-filter.php
<?php
/**
* Change "Driver Dashboard" endpoint title
*
* @return string
*/
function acme_endpoint_title() {
return esc_attr__( 'NEW TITLE HERE', 'acme-lang' );
}
add_filter( 'ddwc_my_account_menu_item_driver_dashboard', 'acme_endpoint_title' );