This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get array of post ID's with specific meta key and value | |
* | |
* @param string $meta_key - The meta key you are checking for | |
* @param string $meta_value - The meta value for the meta key you're checking for | |
* @param string $post_type - The post type to use with get_posts() - default: post | |
* | |
* @return array | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Example cipher function | |
* | |
* @param string $quote - the quote used for the cipher base | |
* @param string $secret - the secret message | |
* @param bool $with_symbols - add random symbols to the string | |
* @param bool $lowercase - should the quote have all lowercase lettering? | |
* | |
* @return string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Age Verification - Redirect on fail | |
* | |
* @param string $url - The full URL to redirect to (include https://) | |
* | |
* @return string | |
*/ | |
function acme_redirect_on_fail_link( $url ) { | |
$url = 'YOUR_NEW_URL_HERE'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove "Delivery" from driver dashboard order details page. | |
*/ | |
add_filter( 'ddwc_driver_dashboard_delivery_total', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var waitForEl = function(selector, callback) { | |
if (jQuery(selector).length) { | |
callback(); | |
} else { | |
setTimeout(function() { | |
waitForEl(selector, callback); | |
}, 100); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) { |