When trying to edit user roles in the Members plugin, it triggers this error:
Fatal error: Uncaught Error: Call to a member function get_id() on bool
in /XXX/wp-content/plugins/epay-payment/epay-payment.php on line 1275
My solution in epay-payment.php:
Before, line 1271:
public function epay_payment_meta_boxes() {
global $post;
if ( ! isset( $post ) ) { //HPOS might be used
$order = wc_get_order();
$order_id = $order->get_id();
} else { ...
After:
public function epay_payment_meta_boxes() {
global $post;
if ( ! isset( $post ) ) { //HPOS might be used
$order = wc_get_order();
if ( ! $order ) {
return;
}
$order_id = $order->get_id();
} else { ...
When trying to edit user roles in the Members plugin, it triggers this error:
Fatal error: Uncaught Error: Call to a member function get_id() on bool in /XXX/wp-content/plugins/epay-payment/epay-payment.php on line 1275
My solution in epay-payment.php: Before, line 1271:
After: