Table Rate Price/Quantity Discount Metadata Name Change
-
Hi all. Before the recent update, I was using a custom function to display the table rate prices on the single product page. Now this has been changed to “Quantity Discounts” so I believe the metadata name value has changed. All of my old products (3000 of them) have the old post metadata name.
Is there a way to update this to the NEW name?
Here’s the old function I’m using:
function add_in_table_rate($product_id){ $output = ''; $metadata = get_post_meta( $product_id , '_wpsc_product_metadata', true); if(!empty($metadata['table_rate_price']['state']) && $metadata['table_rate_price']['state'] ){ echo '<h3>Discounts available on multiple quantities!</h3>'; $output = ''; for($i=0; $i < count($metadata['table_rate_price']['quantity']); $i++){ $output .= "".$metadata['table_rate_price']['quantity'][$i]." for ".wpsc_currency_display($metadata['table_rate_price']['table_price'][$i])." per item <br />"; } $output .= '<br />'; } echo $output; } add_action('wpsc_product_addon_after_descr','add_in_table_rate');
Any help you can provide would be greatly appreciated because any new products I add or old products I modify get updated using the new value name.
Or if anyone has a better way of show the prices of the Quantity Discount I’m also open for other suggestions.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Table Rate Price/Quantity Discount Metadata Name Change’ is closed to new replies.