Skip to content

Instantly share code, notes, and snippets.

@digitalhydra
Created January 28, 2014 16:43
Show Gist options
  • Select an option

  • Save digitalhydra/8671383 to your computer and use it in GitHub Desktop.

Select an option

Save digitalhydra/8671383 to your computer and use it in GitHub Desktop.
restore cart
/**
1264 * Cancel the order and restore the cart (before payment)
1265 *
1266 * @access public
1267 * @param string $note (default: '') Optional note to add
1268 * @return void
1269 */
1270 public function cancel_order( $note = '' ) {
1271 global $woocommerce;
1272
1273 unset( $woocommerce->session->order_awaiting_payment );
1274
1275 $this->update_status('cancelled', $note);
1276
1277 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment