Author: super_admin_v3x

Update prices in bulk

Update WPPizza menu item prices in bulk , adding 10% to all prices (change values as required) example function myprefix_update_wppizza_prices: /* IMPORTANT: RUN THIS ONE TIME ONLY AND DELETE/DISABLE THIS SCRIPT AGAIN WHEN YOU ARE DONE OR YOU WILL CONTINUALLY BE ADDING 10% ON TOP 

WPPizza Mailinglists

Customisations of selected WPPizza Mailinglists Freshmail @param: array @return: array /* Adding preconfigured custom fields */ add_filter(‘wppizza_mll_freshmail_custom_fields’, ‘myprefix_freshmail_customfields’); function myprefix_freshmail_customfields($custom_fields){ /* a) Assign the appropriate field in “WPPizza -> Order Settings -> Mailinglists : Customers Name Formfield” b) Create a custom field for your selected 

Coupons and Discounts

Filters available for WPPizza Coupons and Discounts


Allow to filter (unset) applied discounts – identified by their ID – depending on custom conditions related to cart contents. As with all customisations, use at your own risk. You should test this thoroughly

@since 2.1.4
@param array
@param array
@return array

Remove a specific applied simple discount - identified by its id - if cart contains an item from a certain category
add_filter('wppizza_cad_filter_discounts', 'myprefix_filter_wppizza_cad_filter_discounts', 10, 2);
function myprefix_filter_wppizza_cad_filter_discounts($array_of_discount_ids, $cart){
		skip if there isn't anything in the cart to start off with
		return $array_of_discount_ids;

		discount id to remove if cat id in cart
	$discountIdToRemove = 1;	
	//skip if it does not exist in array anyway
		return $array_of_discount_ids;
		check for category id used by an item in cart
	$findCatId = 6;
		array keys of items consist of blogid.categoryid.postid.sizes and more
		there are also many other ways of doing this by iterating through all items or similar....
		whatever works for you
	//get all keys cart 
	$cart_item_keys = array_keys($cart);
	//iterate through keys to get category id's
	foreach($cart_item_keys as $cart_item_key){
		//explode keys by '.'
		$x = explode('.',$cart_item_key);
			if one of the items in the cart belongs to cat id = 6 , 
			remove discount with id 1 

			$x[0] => blog id
			$x[1] => cat id
			$x[2] => post id
			$x[3] => sizes id
			$x[4] => size id
		if($x[1] == $findCatId){
			break;//no need to continue iteration now	
return $array_of_discount_ids;


Customisations WPPizza Preorder Highlighting preorders for days after today in *emails* sent (for print templates, simply use css declarations) Your email template(s) selected MUST be set to “Html” for this to make any difference set conditionals as required @param: array @param: array @param: str @param: 

Plugin Options

Display a set WPPizza plugin option Display the (raw, unformatted) value of an option set in the WPPizza plugin (strings only). Use your browsers element inspector on an input element to determine the page/parameter combination. If you need access to other parameters not returned by 

Layout (Menu Items, General)

If you wish to alter the display of the WPPizza menu items – alongside many other layout elements – from the installed default, use any of the options below

  • Goto “WPPizza ->Layout”

    Goto “Style” on that page and choose from one of the style options available (currently “default”, “responsive” and “grid” ) as your main / base menu item layout.

    Adjust all other layout options on that page as required
  • Change the order of how elements are displayed by adjusting the “elements” attribute of the shortcodes on your pages according to the shortcode documentation

    For full shortcode attributes list available refer to that same documentation please.
  • Adjust the css according to the css documentation here

In 99% of cases a combination of the above the should let you adjust the layout as you require to fully integrate with your chosen theme I would think (make sure you test any changes you make on multiple devices ).
However, if you still feel the need to modify the templates themselves please refer to the templates documentation

Checkout Formfields

Modify the customer form fields available on the checkout page A few examples as to how you can show/hide/add/modify input formfields available on the checkout page Simple show/hide formfields using css selectors If you wish to simply show hide some formfields when an order is 

Email Subject Line

Change the default subject line used in emails wppizza_filter_email_subject /*** email subject lines are made up of 3 parts filter each part as required based on your preferences ****/ add_filter(‘wppizza_filter_email_subject’, ‘myprefix_filter_email_subject’, 10, 2); function myprefix_filter_email_subject($subject, $order_formatted){ /* defaults //dynamic depending on settings in wppizza order 

Enable Debug

In your wp-config.php you will find a line that reads (most likely) like this:
define('WP_DEBUG', false);

REPLACE this with (or if it does not exist simply add the below)

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);/*this should NEVER be true for production sites*/

Note: this MUST be before /* That's all, stop editing! Happy blogging. */

Which will generate a file “wp-content/debug.log” if and when any errors are encountered.
Check this file for errors if you need to find out where things might go wrong

View the Help Screen

Note that in many cases a lot more information/help is available in the help screens of the plugin

View your browsers console (Typically by using Ctrl+Shift+I)

If you see some “500 Internal server errors” in there, check your server error log. In many cases these are caused by uploading a plugin with the wrong permissions – especially if you add plugins by ftp instead of using the standard wordpress plugin installer. You should also aim to fix any other javascript errors you may have, although some might be more problematic than others

General Troubleshooting

If you have issues with WPPizza – or WordPress in general for that matter – I would highly recommend the following resource(s) to narrow down where your issue(s) might be

As I could not say this any better, forgive me for simply providing the links above. I would, however, especially recommend the “Troubleshooting Plugins” section on the link ; about 2 thirds down on that page.

Of course, if you have followed the recommendations on those pages without being able to solve your problem and still have issues with WPPizza, please get in touch via the usual channels (forum, contact form, emails)

Headers already sent …

if you get something like: Warning: session_start(): Cannot start session when headers already sent in [site-path]/wp-content/plugins/wppizza[xyz]/[some-file] on line [some-line] or Warning: cannot modify header information – headers already sent by [site-path]/[some-dicetory]/[some-file] on line [some-line] The problem is that either: – php notices/warnings/errors etc are output