You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bigcommerce.php
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Plugin Name: BigCommerce for WordPress
4
4
Description: Scale your ecommerce business with WordPress on the front-end and BigCommerce on the back end. Free up server resources from things like catalog management, processing payments, and managing fulfillment logistics.
$select_filter = function ( $select, $wp_query ) use ( $query ) {
59
-
if ( $wp_query !== $query ) {
60
-
return$select;
61
-
}
62
-
$select .= ", COUNT(bcfeatured_terms.name) AS bcfeatured";
63
-
64
-
return$select;
65
-
};
66
-
$join_filter = function ( $join, $wp_query ) use ( $query ) {
67
-
/** @var \wpdb $wpdb */
68
-
global$wpdb;
69
-
if ( $wp_query !== $query ) {
70
-
return$join;
71
-
}
72
-
$join .= " LEFT JOIN {$wpdb->term_relationships} bcfeatured_tr ON bcfeatured_tr.object_id={$wpdb->posts}.ID";
73
-
$join .= $wpdb->prepare( " LEFT JOIN {$wpdb->term_taxonomy} bcfeatured_tt ON bcfeatured_tr.term_taxonomy_id=bcfeatured_tt.term_taxonomy_id AND bcfeatured_tt.taxonomy=%s", Flag::NAME );
74
-
$join .= $wpdb->prepare( " LEFT JOIN {$wpdb->terms} bcfeatured_terms ON bcfeatured_tt.term_id=bcfeatured_terms.term_id AND bcfeatured_terms.slug=%s", Flag::FEATURED );
75
-
76
-
return$join;
77
-
};
78
-
$orderby_filter = function ( $orderby, $wp_query ) use ( $query ) {
0 commit comments