OKU changes to improve performance

1. plugins/woocommerce-grid-list-toggle/grid-list-toggle.php

Commented two lines:
//Both lines commented by daniel
//wp_enqueue_style( ‘grid-list-layout’, plugins_url( ‘/assets/css/style.css’, __FILE__ ) );
//wp_enqueue_style( ‘grid-list-button’, plugins_url( ‘/assets/css/button.css’, __FILE__ ) );

Commented two lines:
//wp_enqueue_script( ‘cookie’, plugins_url( ‘/assets/js/jquery.cookie.min.js’, __FILE__ ), array( ‘jquery’ ) );
//wp_enqueue_script( ‘grid-list-scripts’, plugins_url( ‘/assets/js/jquery.gridlistview.js’, __FILE__ ), array( ‘jquery’ )

);

2. plugins/woocommerce-grid-list-toggle/assets/css/button.css
3. plugins/woocommerce-grid-list-toggle/assets/css/style.css
Moved the content of above two css to twentyoku/style.css

4. plugins/woocommerce-grid-list-toggle/assets/js/jquery.cookie.min.js
5. plugins/woocommerce-grid-list-toggle/assets/js/jquery.gridlistview.min.js
Both contents were moved to twentyoku/footer.php

6. plugins/woo-oku-attributes/wooku-attributes-common.php
I’ve added
if (is_admin())
wp_enqueue_style(‘my_css_dsslider’, plugin_dir_url(__FILE__) . ‘drag.css’);

so that drag.css be available in admin mode only

7. on twentyoku/header.php
commented the first block of php that keep record of site accessing…

8. Installed “Lazy Widget Loader” plugin.
All left sidebar widgets are set to load ‘lazy’.

9. Changed the right sidebar. Instead of pulling content from a post, I made a widget “Right Sidebar” that contains “TEXT”

10. Same thing for the footer text. There is a new widget “Footer Area”. page_footer.php is obsolete

20140221

11. in plugins/woocommerce/woocommerce.php I’ve commented the wp_register_script for several unused woocommerce js

[php]<br />// Register any scripts for later use, or used as dependencies<br />///wp_register_script( ‘chosen’, $this-&gt;plugin_url() . ‘/assets/js/chosen/chosen.jquery’ . $suffix . ‘.js’, array( ‘jquery'<br /><br />), ‘0.9.11’, true );<br />//wp_register_script( ‘jquery-blockui’, $this-&gt;plugin_url() . ‘/assets/js/jquery-blockui/jquery.blockUI’ . $suffix . ‘.js’,<br /><br />array( ‘jquery’ ), ‘2.60’, true );<br />//wp_register_script( ‘jquery-placeholder’, $this-&gt;plugin_url() . ‘/assets/js/jquery-placeholder/jquery.placeholder’ .<br /><br />$suffix . ‘.js’, array( ‘jquery’ ), $this-&gt;version, true );<br /><br />//wp_register_script( ‘wc-add-to-cart-variation’, $frontend_script_path . ‘add-to-cart-variation’ . $suffix . ‘.js’, array(<br /><br />’jquery’ ), $this-&gt;version, true );<br />//wp_register_script( ‘wc-single-product’, $frontend_script_path . ‘single-product’ . $suffix . ‘.js’, array( ‘jquery’ ),<br /><br />$this-&gt;version, true );<br />wp_register_script( ‘jquery-cookie’, $this-&gt;plugin_url() . ‘/assets/js/jquery-cookie/jquery.cookie’ . $suffix . ‘.js’,<br /><br />array( ‘jquery’ ), ‘1.3.1’, true );<br /><br />// Queue frontend scripts conditionally<br />if ( $ajax_cart_en )<br />//wp_enqueue_script( ‘wc-add-to-cart’, $frontend_script_path . ‘add-to-cart’ . $suffix . ‘.js’, array( ‘jquery’ ), $this-<br /><br />&gt;version, true );<br /><br />if ( is_cart() )<br />//wp_enqueue_script( ‘wc-cart’, $frontend_script_path . ‘cart’ . $suffix . ‘.js’, array( ‘jquery’ ), $this-&gt;version, true<br /><br />);<br /><br />if ( is_checkout() ) {<br />if ( $chosen_en ) {<br />//wp_enqueue_script( ‘wc-chosen’, $frontend_script_path . ‘chosen-frontend’ . $suffix . ‘.js’, array( ‘chosen’ ), $this-<br /><br />&gt;version, true );<br />//wp_enqueue_style( ‘woocommerce_chosen_styles’, $this-&gt;plugin_url() . ‘/assets/css/chosen.css’ );<br />}<br /><br />//wp_enqueue_script( ‘wc-checkout’, $frontend_script_path . ‘checkout’ . $suffix . ‘.js’, array( ‘jquery’, ‘woocommerce’ ),<br /><br />$this-&gt;version, true );<br />}<br />[/php]

12. Major tweak!!!
On plugings/woocommerce-seo/woocommerce-seo-widgets.php
on function woocommerce_seo_add_rewrite_rules()
I am returning the $link before updating the woocommerce_seo_rewrite_rules
if (!is_admin())
return $link;

Add Tax row on Aurelie checkout page

On theretailer/woocommerce/checkout/review-order.php file I’ve added the following:[php]

<tr>
<th><strong><?php _e( ‘Incl. Tax’, ‘theretailer’ )?></strong></th>
<td>
<?php
// If prices are tax inclusive, show taxes here
if ( $woocommerce->cart->tax_display_cart == ‘incl’ ) {
$tax_string_array = array();
$taxes = $woocommerce->cart->get_formatted_taxes();

if ( sizeof( $taxes ) > 0 ) {
foreach ( $taxes as $key => $tax ) {
$tax_string_array[] = sprintf( ‘%s %s’, $tax, $woocommerce->cart->tax->get_rate_label( $key ) );
}
} elseif ( $woocommerce->cart->get_cart_tax() ) {
$tax_string_array[] = sprintf( ‘%s tax’, $tax );
}
/*
if ($_SERVER[‘REMOTE_ADDR’] == ‘81.89.11.237’){
echo "<pre>";
var_dump($tax);
var_dump($tax_string_array);
echo "</pre>";
}
*/
if ( ! empty( $tax_string_array ) ) {
/*
?><small><?php printf( __( ‘(Includes %s)’, ‘woocommerce’ ), implode( ‘, ‘, $tax_string_array ) ); ?></small><?php
*/
?><small><?php echo $tax; ?></small><?php
}
}
?>
</td>
</tr>

[/php]

There was a single row instead. For differences, see the original file on theretailer/woocommerce template.