gpecf_styles

  1. Description
  2. Usage
  3. Parameters
  4. Example
    1. Customize Inline Styles of Order Summary
  5. Source
  6. Since

Description

Filter inline styles which will be applied to the order summary.

Usage

add_filter( 'gpecf_styles', 'my_custom_function' );

Parameters

  • styles array

    An array of styles in array( selector => array( property => 'value' ) ) format.

Example

Customize Inline Styles of Order Summary

add_filter( 'gpecf_styles', function() {
	$orderlabel = array( 
		'tr.order-label' => array( 
		    'font-family' => 'sans-serif',
		    'font-size'   => '14px',
	    	'background-color' => '#f1f1f1',
		    'font-weight' => 'bold' )
	);
	$ordersummary = array(
		'.order-summary' => array(    
		    'th' => array(
			'font-family' => 'sans-serif',
			'font-size'   => '14px',
             'font-weight' => 'bold' 
			),
		    'td' => array(
			'font-family' => 'sans-serif',
			'font-size'   => '12px',
		    ),
		)
	);
	$styles =  array_merge_recursive( $orderlabel, $ordersummary );
	return $styles;
});

Source

This filter is located in GP_Ecommerce_Fields::get_styles() in class-gp-ecommerce-fields.php.

Since

This filter is available since GP eCommerce Fields 1.0.