Support GET for ordering. Closes #269.
This commit is contained in:
parent
ca8523361b
commit
48d1fac0d4
|
@ -3,8 +3,8 @@
|
|||
* Sorting
|
||||
*/
|
||||
?>
|
||||
<form class="woocommerce_ordering" method="post">
|
||||
<select name="catalog_orderby" class="orderby">
|
||||
<form class="woocommerce_ordering" method="<?php if (get_option( 'permalink_structure' )=="") echo 'POST'; else echo 'GET'; ?>">
|
||||
<select name="orderby" class="orderby">
|
||||
<?php
|
||||
$catalog_orderby = apply_filters('woocommerce_catalog_orderby', array(
|
||||
'title' => __('Alphabetically', 'woocommerce'),
|
||||
|
|
|
@ -145,7 +145,7 @@ function woocommerce_nav_menu_items( $items, $args ) {
|
|||
* Update catalog ordering if posted
|
||||
*/
|
||||
function woocommerce_update_catalog_ordering() {
|
||||
if (isset($_POST['catalog_orderby']) && $_POST['catalog_orderby'] != '') $_SESSION['orderby'] = $_POST['catalog_orderby'];
|
||||
if (isset($_REQUEST['orderby']) && $_REQUEST['orderby'] != '') $_SESSION['orderby'] = esc_attr($_REQUEST['orderby']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue