PluginProbe
Packeta / 2.0.9
Packeta v2.0.9
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | src/Packetery/Module/QueryProcessor.php +4 -24 trunk2.0.9 View file →
@@ -64,35 +64,15 @@
64 64 * Extends WP_Query to include custom table.
65 65 *
66 66 * @link https://wordpress.stackexchange.com/questions/50305/how-to-extend-wp-query-to-include-custom-table-in-query
67 67 *
68 - * @param array<string, string>|mixed $clauses Clauses.
69 - * @param \WP_Query|mixed $queryObject WP_Query.
68 + * @param array<string, string> $clauses Clauses.
69 + * @param \WP_Query $queryObject WP_Query.
70 70 *
71 - * @return array<string, string>|mixed
71 + * @return array<string, string>
72 72 */
73 - public function processClauses( $clauses, $queryObject ) {
73 + public function processClauses( array $clauses, \WP_Query $queryObject ): array {
74 74 if ( $this->contextResolver->isOrderGridPage() === false ) {
75 - return $clauses;
76 - }
77 -
78 - if ( ! is_array( $clauses )
79 - || array_filter(
80 - $clauses,
81 - static function ( $value, $key ) {
82 - return is_string( $key ) && is_string( $value );
83 - },
84 - ARRAY_FILTER_USE_BOTH
85 - ) !== $clauses
86 - ) {
87 - WcLogger::logArgumentTypeError( __METHOD__, 'clauses', 'array', $clauses );
88 -
89 - return $clauses;
90 - }
91 -
92 - if ( ! $queryObject instanceof \WP_Query ) {
93 - WcLogger::logArgumentTypeError( __METHOD__, 'queryObject', \WP_Query::class, $queryObject );
94 -
95 75 return $clauses;
96 76 }
97 77
98 78 $isOrderPostQueryCall =