The “ims_default_pricelists” filter is used to modify the default price list when the plugin is activated. View content types ims_pricelist and ims_package; and post meta keys _ims_price, _ims_list_opts and _ims_sizes for more information.

A plugin (or theme) can modify the array with the code:

<?php add_filter( 'ims_default_pricelists', 'filter_function_name' ); ?>

The hook is located in the image-store/admin/install.php file.


// Apply filter
function modify_ims_default_price_list( $pricelist ) {
	// change the price for image sizes 4x6
	foreach( $pricelist['sizes'] as $key => $size ){
		if( $size[name] == '4x6' )
			$pricelist[$key][price] = "5.60";
	return $pricelist; 
add_filter('ims_default_pricelist', 'modify_ims_default_price_list');

Note:  $pricelist is an multidimensional array.

Leave a Reply

Your email address will not be published. Required fields are marked *