PLUGIN FIX please read
-
Thanks to JasperPress
function filter_session($session_data, $value, $key){ if ($value['sample']){ $session_data['sample'] = true; $session_data['unique_key'] = $value['unique_key']; //$session_data['data']->price = 0; $product_id = $session_data['product_id']; $sample_price_mode = get_post_meta($product_id, 'sample_price_mode', true) ? get_post_meta($product_id, 'sample_price_mode', true) : 'default'; $sample_price = get_post_meta($product_id, 'sample_price', true) ? get_post_meta($product_id, 'sample_price', true) : 0; if ($sample_price_mode === 'custom'){ $session_data['data']->set_price( $sample_price ); }else if ($sample_price_mode === 'free'){ $session_data['data']->set_price( '0' ); }else{ //default } } return $session_data; }
I modified line 210 and 212 from:
210: $session_data['data']->price = $sample_price; 212: $session_data['data']->price = 0;
to:
210: $session_data['data']->set_price( $sample_price ); 212: $session_data['data']->set_price( '0' );
- The topic ‘PLUGIN FIX please read’ is closed to new replies.