Changeset 987197
- Timestamp:
- 09/11/2014 11:59:20 AM (12 years ago)
- Location:
- woocommerce-poor-guys-swiss-knife/trunk
- Files:
-
- 3 edited
-
classes/woocommerce-poor-guys-swiss-knife.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
woocommerce-poor-guys-swiss-knife.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-poor-guys-swiss-knife/trunk/classes/woocommerce-poor-guys-swiss-knife.php
r986730 r987197 107 107 108 108 add_action( 'woocommerce_init', array( $this, 'wcpgsk_empty_cart' ), PHP_INT_MAX ); 109 109 add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'wcpgsk_checkout_update_order_meta' ), 10, 2 ); 110 110 } 111 111 … … 3296 3296 3297 3297 elseif ( ( isset($options['woofields']['billing'][$key]['custom_' . $key]) && $options['woofields']['billing'][$key]['custom_' . $key] ) || ( isset( $options['woofields']['shipping'][$key]['custom_' . $key] ) && $options['woofields']['shipping'][$key]['custom_' . $key] ) ) : 3298 //validate date fields3299 /*3300 if ( $options['woofields']['type_' . $key] == 'text' && !empty($_POST[$key]) ) :3301 if ( isset( $params['pattern'] ) && !empty( $params['pattern'] ) ) :3302 $pregex = @preg_match('/' . str_replace( "/", "\/", $params['pattern'] ) . '/', $_POST[$key]);3303 if ($pregex === false || $pregex === 0) :3304 // the regex failed and is likely invalid3305 $forLabel = $_POST[$key];3306 if ( isset($options['woofields']['label_' . $key]) && !empty($options['woofields']['label_' . $key]) ) :3307 $forLabel = __($options['woofields']['label_' . $key], WCPGSK_DOMAIN);3308 endif;3309 wcpgsk_add_error( '<strong>' . sprintf(__('Value of <em style="color:red">%s</em> does not fulfil the established pattern test: <em>%s</em>!', WCPGSK_DOMAIN), $forLabel, $params['pattern'] ) . '</strong>');3310 else :3311 wcpgsk_add_error( '<strong>Pattern matched?</strong>');3312 endif;3313 else :3314 wcpgsk_add_error( '<strong>No pattern</strong>');3315 endif;3316 endif;3317 */3318 3298 if ( $options['woofields']['type_' . $key] == 'date' && !empty($_POST[$key]) ) : 3319 3299 //transform back based on field setting … … 3420 3400 } 3421 3401 3402 function wcpgsk_checkout_update_order_meta( $order_id, $posted ) { 3403 global $woocommerce; 3404 global $wcpgsk_session; 3405 if ( function_exists('WC') ) : 3406 WC()->session->set('post', $_POST); 3407 else : 3408 $wcpgsk_session->post = $_POST; 3409 endif; 3410 $options = get_option( 'wcpgsk_settings' ); 3411 foreach($posted as $key => $val) : 3412 if ( isset($options['woofields']['billing'][$key]['custom_' . $key] ) || isset($options['woofields']['billing'][$key]['custom_' . $key] ) ) : 3413 update_post_meta( $order_id, "_" . $key, $val ); 3414 endif; 3415 endforeach; 3416 3417 } 3422 3418 3423 3419 public function createCustomStandardField($customkey, $context, $type) { -
woocommerce-poor-guys-swiss-knife/trunk/readme.txt
r986730 r987197 5 5 Requires at least: Wordpress 3.1 and WooCommerce 2.0 6 6 Tested up to: 4.0 7 Stable tag: 1.9.8 17 Stable tag: 1.9.82 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 261 261 == Changelog == 262 262 263 = 1.9.82 = 264 265 * Service release for WooCommerce 2.2 fixing order meta storage 266 263 267 = 1.9.81 = 264 268 -
woocommerce-poor-guys-swiss-knife/trunk/woocommerce-poor-guys-swiss-knife.php
r986730 r987197 8 8 * Author: Uli Hake 9 9 * Author URI: http://takebarcelona.com/authorship/uli-hake 10 * Version: 1.9.8 110 * Version: 1.9.82 11 11 * @package WordPress 12 12 * @subpackage WooCommerce Poor Guys Swiss Knife … … 107 107 //load into our global 108 108 $wcpgsk = new WCPGSK_Main( __FILE__ ); 109 $wcpgsk->version = '1.9.8 1';109 $wcpgsk->version = '1.9.82'; 110 110 $wcpgsk->wcpgsk_hook_woocommerce_filters(); 111 111
Note: See TracChangeset
for help on using the changeset viewer.