Skip to content

Instantly share code, notes, and snippets.

@573
573 / readme.js
Created April 30, 2019 11:04
Add this bookmarklet for archive.today
javascript:void(open('http://archive.today/?run=1&url='+encodeURIComponent(document.location)))
@woogists
woogists / wc-bookings-automatically-confirm-cod-bookings.php
Created March 9, 2018 16:25
[WooCommerce Bookings] Automatically confirm bookings purchased via COD
/**
* Will put bookings into a Confirmed status if they were paid for via COD.
*
* @param int $order_id The order id
*/
function set_cod_bookings_confirmed_20170825( $order_id ) {
// Get the order, then make sure its payment method is COD.
$order = wc_get_order( $order_id );
if ( 'cod' !== $order->get_payment_method() ) {