ims_cart_google_hidden_fields

Description

The “ims_cart_google_hidden_fields” filter is used to add additional input fields for GoogleCheckout.

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

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

The hook is located in the image-store/_inc/gateways/google.php file.

Example

// Apply filter
function add_ims_cart_google_hidden_fields( $output, $ImStoreCart ) {
	return $output . '<input name="site" id="site" value="sitename" type="hidden" />';
}
add_filter('ims_cart_google_hidden_fields', 'add_ims_cart_google_hidden_fields');

Note:  $output is a HTML string, $ImStoreCart is the global cart object.


Leave a Reply

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