mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Check if the $wpdb->wc_orders
exists before query.
This commit is contained in:
parent
d711a7b512
commit
960fdc59da
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ class PPECHelper {
|
|||
}
|
||||
|
||||
global $wpdb;
|
||||
if ( class_exists( OrderUtil::class ) && OrderUtil::custom_orders_table_usage_is_enabled() ) {
|
||||
if ( class_exists( OrderUtil::class ) && OrderUtil::custom_orders_table_usage_is_enabled() && isset( $wpdb->wc_orders ) ) {
|
||||
$result = $wpdb->get_var(
|
||||
$wpdb->prepare(
|
||||
"SELECT 1 FROM {$wpdb->wc_orders} WHERE payment_method = %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue