Created
January 28, 2014 16:43
-
-
Save digitalhydra/8671383 to your computer and use it in GitHub Desktop.
restore cart
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
| /** | |
| 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