Changeset 3320750
- Timestamp:
- 07/01/2025 04:08:42 PM (7 months ago)
- Location:
- coopcycle/trunk
- Files:
-
- 2 edited
-
coopcycle.php (modified) (1 diff)
-
legacy_shortcode.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coopcycle/trunk/coopcycle.php
r3320625 r3320750 5 5 * Plugin URI: https://coopcycle.org/ 6 6 * Description: CoopCycle plugin for WordPress 7 * Version: 1.1. 07 * Version: 1.1.1 8 8 * Domain Path: /i18n/languages/ 9 9 */ -
coopcycle/trunk/legacy_shortcode.php
r3320617 r3320750 2 2 3 3 function coopcycle_checkout_process() { 4 4 5 // TODO Make sure shipping time is valid 5 6 … … 14 15 } 15 16 16 function coopcycle_checkout_ update_order_meta($order_id) {17 function coopcycle_checkout_create_order(WC_Order $order) { 17 18 18 19 // Skip if another shipping method was chosen … … 22 23 23 24 if (!empty($_POST['shipping_date'])) { 24 update_post_meta($order_id,'shipping_date', sanitize_text_field($_POST['shipping_date']));25 $order->update_meta_data('shipping_date', sanitize_text_field($_POST['shipping_date'])); 25 26 } 26 27 } … … 69 70 add_action('woocommerce_checkout_process', 'coopcycle_checkout_process'); 70 71 71 add_action('woocommerce_checkout_ update_order_meta', 'coopcycle_checkout_update_order_meta');72 add_action('woocommerce_checkout_create_order', 'coopcycle_checkout_create_order', 10, 1); 72 73 73 74 add_action('wp_enqueue_scripts', 'coopcycle_enqueue_scripts');
Note: See TracChangeset
for help on using the changeset viewer.