<?php
  function unipixel_is_woo_event_enabled($platform_id, $event_platform_ref) { global $wpdb;  $platform_table = $wpdb->prefix . "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x5F\x73\x65\x74\x74\x69\x6E\x67\x73"; $platform_enabled = $wpdb->get_var( $wpdb->prepare( "SELECT platform_enabled FROM %i WHERE id = %d", $platform_table, $platform_id ) ); if (! $platform_enabled) { return false; } $table_name = $wpdb->prefix . "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x77\x6F\x6F\x63\x6F\x6D\x6D\x5F\x65\x76\x65\x6E\x74\x5F\x73\x65\x74\x74\x69\x6E\x67\x73";  $query = $wpdb->prepare( "SELECT event_enabled FROM %i WHERE platform_id = %d AND event_platform_ref = %s", $table_name, $platform_id, $event_platform_ref );  $row = $wpdb->get_row($query); if (!$row) { return false; } return (bool) $row->event_enabled; } function unipixel_woo_event_get_settings($platform_id, $event_platform_ref) { global $wpdb; $table_name = $wpdb->prefix . "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x77\x6F\x6F\x63\x6F\x6D\x6D\x5F\x65\x76\x65\x6E\x74\x5F\x73\x65\x74\x74\x69\x6E\x67\x73";  $query = $wpdb->prepare( "SELECT * FROM %i WHERE platform_id = %d AND event_platform_ref = %s", $table_name, $platform_id, $event_platform_ref );  $row = $wpdb->get_row($query);  return $row ?: new stdClass();  } 