Add HPOS compatibility to all metaboxes

This commit is contained in:
Emili Castells Guasch 2023-08-14 12:16:49 +02:00
parent 52f6505eca
commit a7bf718271
3 changed files with 25 additions and 6 deletions

View file

@ -20,7 +20,7 @@ trait AdminContextTrait {
* @return bool
*/
private function is_paypal_order_edit_page(): bool {
$post_id = isset( $_GET['post'] ) ? (int) $_GET['post'] : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
$post_id = wc_clean( wp_unslash( $_GET['id'] ?? $_GET['post'] ?? '' ) );
if ( ! $post_id ) {
return false;
}