This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_order_number', 'webendev_woocommerce_order_number', 1, 2 ); | |
/** | |
* Add Prefix to WooCommerce Order Number | |
* | |
*/ | |
function webendev_woocommerce_order_number( $oldnumber, $order ) { | |
return 'WE' . $order->id; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'posts_where', 'wpse29897_no_parents', 10, 2 ); | |
function wpse29897_no_parents( $where, $query ) | |
{ | |
if( isset( $query->query_vars['post_type'] ) && 'city' == $query->query_vars['post_type'] ) | |
{ | |
if( '' != $where ) | |
{ | |
$where .= ' AND post_parent != 0'; | |
} |
NewerOlder