fix php notice with wordpress api changes